레이블이 graph인 게시물을 표시합니다. 모든 게시물 표시
레이블이 graph인 게시물을 표시합니다. 모든 게시물 표시

2012년 4월 21일 토요일

Skipping items in a legend

Each curve has a handle, which can be obtained from the properties.



h1 = plot(rand(1,10));      % Blue line
hold on;
h2 = plot(rand(1,10),'r');  % Red line
h3 = plot(rand(1,10),'g');  % Green line
legend([h1 h3],{'hello','world'});  % Only the blue and green lines appear
                                    %   in the legend


http://www.mathworks.com/matlabcentral/answers/406-how-do-i-skip-items-in-a-legend