legend doesn't resize with figure

조회 수: 8 (최근 30일)
Chong Hou
Chong Hou 2011년 4월 18일
I meet such a problem that the legend for the gigure overlaps with some lines when it's originally drawn. Then when I maximize the window of figure, the legend doesn't overlap the lines. I use saveas function to save figure and the function only save the original size figure (even if I resize the figure before I run the saveas function). I am wondering if there is a way to set the legend auto resize with the figure. Thanks!

답변 (3개)

Walter Roberson
Walter Roberson 2011년 4월 19일
Check the PaperPosition property of figures.
Or use the Matlab File Exchange submission "export_fig"

Chong Hou
Chong Hou 2011년 4월 20일
I solve this problem by setting the legend fontsize to be smaller using such code:
legend([h1,h2],'\fontsize{6}Length','\fontsize{6}Stress','location','southeast');

dk
dk 2011년 4월 20일
Make sure "Match figure screen size" is checked under Preferences-->Figure Copy Template-->Copy Options.

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by