Legend Colors not according to figure
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Luciano Silva
el 18 de Dic. de 2019
Respondida: ME
el 18 de Dic. de 2019
In a previous Matlab version (2012), the legend colors were according to the plot.
![2012.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/255089/2012.png)
Now, the same code, in a new version (2015) gives the results below. Note the legend colors.
![2015.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/255090/2015.png)
Even in the Matlab help section about legend we see the same problem
![mat.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/255091/mat.png)
Is thes a bug? Is there a way to solve it?
Thank you
1 comentario
Walter Roberson
el 18 de Dic. de 2019
Yes, it was a bug in that old of a release. If I recall correctly, the work-around involved calling legend() with more than one output, and setting the properties of the objects that are returned from the second output of legend() .
Note that when you call legend() with more than one output in R2014b or newer, then legend() works differently (and has a different set of bugs) than if you call legend() with at most one output.
Respuesta aceptada
ME
el 18 de Dic. de 2019
Walter Roberson is correct in his comment. You can find more information on how to sort this in the following links:
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Legend en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!