Label more than 7 lines in a plot
39 visualizaciones (últimos 30 días)
I am realizing that after 7 lines, Matlab seems to run out of colors for graphs and legends..is that correct? Currently I am plotting the following:
matA is a 200x8 matrix, but after plotting I see that the lines 1 and 8 both have the same colors..what is the easiest way out?
Renato Agurto el 29 de Sept. de 2016
one solution is to plot in different lines styles:
In your example
Adam el 29 de Sept. de 2016
Editada: Adam el 29 de Sept. de 2016
You can set your own colours for lines you plot and you can also specify the colours used on an axes by setting the
property of an axes. By default this is a 7x3 array. You can extend it or replace it with any number of rows you want so long as it is nx3.
The legend doesn't run out of colours either, it just reflects the colours assigned to the plots so if they repeat then obviously so does it otherwise it would not be reflecting the curves correctly.