Legend Positioning / Re-size Bug in R2014b?
2 ビュー (過去 30 日間)
古いコメントを表示
When I execute the following code I am unable to select the legend object and re-size it using the mouse by grabbing the handles and dragging it. Even re-positioning the legend becomes problematic using the mouse. It appears to be connected to the two "set" commands. If the set commands are commented out then I have no issues with positioning or re-sizing the legend. Does anybody else have this problem?
hf2 = figure(2);
set(gcf,'units','inches')
set(gcf,'position',[0.5 0.5 5.5 4])
plot(rand(5,5))
legend('1','2','3','4','5')
1 件のコメント
Adam
2014 年 11 月 7 日
Same behaviour for me on resizing (something I never do anyway, but I also never use inches if that is the cause).
Moving is no problem though as that is done without having to go into selection mode, it just drags around as normal in standard mode.
回答 (1 件)
Image Analyst
2014 年 11 月 7 日
I didn't even know you could do that since I almost always do things programmatically rather than interactively, but it works fine for me in R2014b. I can click and drag the legend box to a new precise position with absolutely no problems.
6 件のコメント
Image Analyst
2014 年 11 月 7 日
If the arrow icon is not pushed in, I can drag it around. If the arrow icon is pushed in, I get resizing handles but can't resize it or move it. I can set the font size in advance doing this:
set(gca, 'FontSize', 30);
legend('1','2','3','4','5')
参考
カテゴリ
Help Center および File Exchange で Legend についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!