Clear Filters
Clear Filters

Wrong symbols in the legend

17 views (last 30 days)
Benedict Baumann
Benedict Baumann on 17 Dec 2018
Answered: Benedict Baumann on 17 Dec 2018
Hi, when i run my Matlab skript, my plots are all correct, but the legend only contains the same symbols. Does anybody have an idea, what might be the problem?
I use a while loop, getting the value of the red and blue circles.
Greets, BenePlot.png

Answers (2)

madhan ravi
madhan ravi on 17 Dec 2018

Benedict Baumann
Benedict Baumann on 17 Dec 2018
Thanks for your answer. Unhappily this way didn't work for my problem.
In the end i just had to put the variable of each plot in the squared bracket at the beginning of the legend command.
legend ([plot_1, plot_2,plot_3, plot_4, plot_5,plot_6],'a','b','c','d','f','g','location','southeast');
I would highlight it here, but i cannot find a marker option in this editor. ;)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!