Possible to set new colors with a string color specifier?

The color specifier of a line can be set with 'b' for blue for example. Is it possible to this also for the new color order? Or is it possible to map somehow the "old" blue to the new blue, lighter blue? I would like to have the simple notation of the old color order with the new color order.

 Respuesta aceptada

Hi Stefan,
you can use this data:
c = get(0, 'DefaultAxesColorOrder');
plot(x, y, 'Color', c(1,:));
Titus

Más respuestas (2)

Guillaume
Guillaume el 9 de En. de 2015
No, when you specify the colour 'b', it doesn't mean pick the blue colour in colororder, it means use the colour [0 0 1] regardless of what's in the colororder property.
There is no way to override this. (see ColorSpec in the doc).

1 comentario

Thanks for your reply. Is it possible to access the color of the "colororder"? Something like
plot(x, y, 'Color', colororder(1))

Iniciar sesión para comentar.

Image Analyst
Image Analyst el 9 de En. de 2015
See my demo (attached below this image that it creates) for changing the default color order.

Categorías

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by