What colormap is used to generate ColorOrder?
Mostra commenti meno recenti
What colormap is used to generate the default ColorOrder used for successive lines in a plot? (I am asking because I want to automatically generate these default colors, and thought colormap might be a way to do so.) In R2016b, these colors can be listed as,
c = get(0, 'DefaultAxesColorOrder')
c =
0 0.4470 0.7410
0.8500 0.3250 0.0980
0.9290 0.6940 0.1250
0.4940 0.1840 0.5560
0.4660 0.6740 0.1880
0.3010 0.7450 0.9330
0.6350 0.0780 0.1840
which is a dull red, blue, yellow, etc. My first thought was that the rows of c came from the parula colormap, the default for pcolor-style plots, but no rows of c and p match,
K>> p = parula(7)
p =
0.2081 0.1663 0.5292
0.0244 0.4350 0.8755
0.0265 0.6137 0.8135
0.1986 0.7214 0.6310
0.6473 0.7456 0.4188
0.9856 0.7372 0.2537
0.9763 0.9831 0.0538
I think it's some kind of visually balanced colormap ordered so each line's color is distinct from its neighbors. What colormap is it?
Risposta accettata
Più risposte (1)
Abby Skofield
il 1 Mag 2018
The lines command returns "the color scheme matches the default ColorOrder property of the Axes." In the default case, the following code
co = lines(7)
returns the 7 colors in the default Axes ColorOrder. The lines function is one of the family of predefined colormap functions .
1 Commento
KAE
il 1 Mag 2018
Categorie
Scopri di più su Color and Styling in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!