Legend inside a plot
古いコメントを表示
Hi all, I want to plot more than two graphs inside a figure, but I would like to label with a legend just two of them. It is possible without writing anything in the related position inside the command legend: legend('string1','','','string2')
but I get the line of the missing label in the legend panel!!
How can I take off the string and the symbol in the legend panel???
Thanks M
2 件のコメント
Oleg Komarov
2012 年 5 月 27 日
You can start by giving a complete example of the issue:
http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
Ocram
2012 年 5 月 27 日
回答 (2 件)
Walter Roberson
2012 年 5 月 27 日
0 投票
Ocram
2012 年 5 月 27 日
3 件のコメント
Walter Roberson
2012 年 5 月 27 日
axch = get(gca, 'Children');
Then in your set() code, replace h with axch(2)
Ocram
2012 年 5 月 28 日
Oleg Komarov
2012 年 5 月 28 日
What do you mean? It does work for me:
axch = get(gca, 'Children');
set(get(get(axch(2),'Annotation'),'LegendInformation'),'IconDisplayStyle','off');
カテゴリ
ヘルプ センター および File Exchange で Legend についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!