How reduce/resize legend dimensions and marker size in R2016a

6 ビュー (過去 30 日間)
Oladunjoye Awoga
Oladunjoye Awoga 2016 年 11 月 29 日
コメント済み: David J. Mack 2016 年 12 月 29 日
Hi,
I am using the 2016 version of MATLAB (R2016a). I have a figure with three lines which have different colours. I resize the figure window to fit one column but the legend box does not change with it. I have tried to use the position property to change the dimension of the legend but it didn't work. I also tried to reduce the font but this doesn't help when figure is saved in other formats of than fig. I have tried some exchange files (legendmarkeradjust and setLegMarkSize) but still no difference.
I will appreciate it if someone can help me out.

採用された回答

David J. Mack
David J. Mack 2016 年 11 月 29 日
Hey Oladunjoye!
This is a problem in Matlab for quite some time. Customizing legends is quite cumbersome as Matlab tries to make sure that the Legend stays readable. I have written a function to resize a legend ( resizeLegend ) and there is also another function to create more customizable legends ( legendflex ).
Greetings, David
  2 件のコメント
Oladunjoye Awoga
Oladunjoye Awoga 2016 年 11 月 29 日
Thanks David.
The functions are nice but I still have problem of the dimension of legend when I resize the figure window
David J. Mack
David J. Mack 2016 年 12 月 29 日
Unfortunately, resizing the legend and the figure is something which is far not solvable... For export, I'd recommend setting the figure size, then changing the legend and then export.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by