Possible to set new colors with a string color specifier?
3 views (last 30 days)
Show older comments
Stefan Gachter
on 9 Jan 2015
Answered: Image Analyst
on 9 Jan 2015
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.
0 Comments
Accepted Answer
Titus Edelhofer
on 9 Jan 2015
Hi Stefan,
you can use this data:
c = get(0, 'DefaultAxesColorOrder');
plot(x, y, 'Color', c(1,:));
Titus
0 Comments
More Answers (2)
Guillaume
on 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.
Image Analyst
on 9 Jan 2015
See my demo (attached below this image that it creates) for changing the default color order.
0 Comments
See Also
Categories
Find more on Graphics Object Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!