How to correct the order of colours while using legend command?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a plot for 6 different line equations. I have plotted these with 6 different color, but in the plot, in legend location the colors are coming out of the order in which they were plotted. Please help if anyone knows how to correct this problem.
2 Kommentare
Image Analyst
am 15 Okt. 2015
Did you plot a 2D matrix, or did you call plot 6 different times with 6 different vectors?
Antworten (2)
Thorsten
am 15 Okt. 2015
This is the expected behavior of the legend function. If you want another order, the simplest way is to change the order of plotting the equations. If you do not tell us what you want to achieve, we cannot guess how to 'correct' the correct behavior of a function.
2 Kommentare
Paromita Bhattacharjee
am 15 Okt. 2015
Bearbeitet: Image Analyst
am 15 Okt. 2015
Image Analyst
am 15 Okt. 2015
It works fine for me. I'm using R2015b. What version are you using? Can you post a screenshot?
0 Kommentare
Siehe auch
Kategorien
Mehr zu Legend finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!