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

댓글 없음:

댓글 쓰기