Legend command creates too many entries
Show older comments
How do I get the legend to only have a few of the plots and not all of them? I try plotting two plots, creating a legend for the two plots, and then I add another plot and it automatically goes in the legend as 'data1'. How do I not have the last plot in my legend?
Reproduction steps:
>> plot(1:10)
>> hold on
>> plot(1:3:12)
>> legend('plot1', 'plot2')
>> plot(1:2:16)
Accepted Answer
More Answers (0)
Categories
Find more on Legend in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!