How to reduce number of entries in legend

60 ビュー (過去 30 日間)
xplore29
xplore29 2014 年 9 月 15 日
回答済み: Hikaru 2014 年 9 月 16 日
I am plotting 9 curves from the following 9 vectors.
r_t1 , g_t1 , b_t1 r_t2 , g_t2 , b_t2 r_t3 , g_t3 , b_t3
My color choice is r---red g---green b---blue
and marker is
t1 ---- '+', t1 ---- '*', t1 ---- 'o'
So instead of having '9' entries in legend, I want only 6. 3 indicating r,g,b and 3 indicating t1,t2,t3
How can i do this?
  1 件のコメント
xplore29
xplore29 2014 年 9 月 16 日
Correction:
t1 ---- '+', t2 ---- '*', t3 ---- 'o'

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

採用された回答

Hikaru
Hikaru 2014 年 9 月 16 日
I don't really understand the specifics here, but you could choose which plot to display in the legend if you have the handles.
For example.
figure, hold all
r1 = plot(0:9,1:10,'-r')
g1 = plot(0:9,1:2:20,'-g')
b1 = plot(0:9,2:3:30,'-b')
legend([r1 g1],{'Red','Green'}) % will display only 2 entries in the legend

その他の回答 (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