Problems with legend function for plotting figure
Show older comments
Hi,
Below is a copy of my script for graphing a figure that has 22 inputs of data. Each input of data comes from a different variable, and I have assigned each variable a name in the legend. I would like to make a loop for the list names instead of having to input the name manually. Plus, each time I have different number of variables I'm plotting, I have to either add or remove names from the legend.
Write loops aren't a problem for me, what the problem is getting the right amount of names for the legend function. I've tried making a variable that has a list of the names, then tried to index the variable while inside the legend function, but I can't seem to get that to work either.
Any help is appreciated
1 Comment
José-Luis
on 25 Jun 2014
Please edit your post.
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!