How to exclude a line in legend?
3 views (last 30 days)
Show older comments
Guilherme Lopes de Campos
on 24 Sep 2019
Answered: Jos (10584)
on 24 Sep 2019
Hi Matlab community,
I am plotting a graphic, that there are 4 lines, (2 green and 2 red). I would like to appear in the legend of graphic, just one time an information about the limits: For example, there are two lines red, I would like to that in legend, appears only a time in red , and the green line the same way.
Could you help me?
I am very grateful!
Guilherme ![plot.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/239479/plot.png)
![plot.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/239479/plot.png)
0 Comments
Accepted Answer
Jos (10584)
on 24 Sep 2019
Get the handles of the lines and create a legend only for the desired handles. It is all in the documentation :-)
doc legend
0 Comments
More Answers (0)
See Also
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!