LEGEND TITLE
16 ビュー (過去 30 日間)
古いコメントを表示
I am using the following command line to change the text of a figure's default legend:
legend('820mm','750mm','680mm','585mm','470mm','Location','NE');
but would like to add what the measurements relate to in a LEGEND TITLE, eg. 'Panel sizes (mm)'. Then I don't have to have 'mm' on every line and don't have to say what they measure elsewhere.
Shouldn't be difficult but can't find it in help. Would somebody kindly help please?
Thank you.
0 件のコメント
採用された回答
Andrew Newell
2012 年 2 月 15 日
There is a lot of information buried in layers of handle graphics. You can do the following:
hleg = legend('820mm','750mm','680mm','585mm','470mm','Location','NE');
htitle = get(hleg,'Title');
set(htitle,'String','Panel sizes (mm)')
Use get(htitle) to see a lot of other properties you can manipulate.
4 件のコメント
Eddy Barratt
2016 年 8 月 26 日
I believe there are easier options in more recent versions of MATLAB. Certainly the R2016a online documentation for legend suggests that you can simply call
title(hleg, 'Panel sizes (mm)').
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Legend についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!