Building legends with extraordinary properties
    6 ビュー (過去 30 日間)
  
       古いコメントを表示
    
Legend command denotes all plotted items in a serial order. Questions: 1. Is there a way how to skip denoting some plotted items from a legend?
   *Example 1*:  Plotted items are  line1, line2, line3
   *legend  1*:  line1, line3 % how to pruce it?
2. Is there a possibility to gather items under one in a legend?
   *Example 2*:  Plotted items are  line, marker
   *legend  2*:  Is it possible to have only one gathered item in a legend?
0 件のコメント
採用された回答
  Thorsten
      
      
 2013 年 2 月 8 日
        
      編集済み: Thorsten
      
      
 2013 年 2 月 8 日
  
      Example 1
 x = -pi:0.1:pi;
 h = plot(x, sin(x), 'r', x, cos(x), 'b', x, x, 'k');
 legend(h([1 3]), {'sin' 'x'})
Example 2 (use a third fake entry with both line and marker)
 x = -pi:0.1:pi;
 h = plot(x, sin(x), 'b-', x, cos(x), 'bo', x(1), cos(x(1)), 'b-o');
 legend(h(3), {'sin cos'})
その他の回答 (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!

