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.

 Réponse acceptée

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

Plus de réponses (2)

Guillaume
Guillaume le 9 Jan 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 commentaire

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

Connectez-vous pour commenter.

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

Catégories

En savoir plus sur Images dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by