Opened 7 years ago
Closed 6 years ago
#3371 closed enhancement (fixed)
Perceptual color tables
Reported by: | baharmon | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.6.0 |
Component: | Default | Version: | svn-trunk |
Keywords: | r.colors, v.colors, inferno, magma, plasma | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
Add more perceptual color tables like viridis to GRASS. The other perceptual color tables - magma, plasma, and inferno - created by Stéfan van der Walt and Nathaniel Smith for matplotlib would a useful addition.
Furthermore, the r.cpt2grass addon could be integrated into r.colors as an option for importing colors rules from the web.
Attachments (3)
Change History (10)
comment:1 by , 7 years ago
Milestone: | → 7.2.4 |
---|
by , 6 years ago
comment:2 by , 6 years ago
Agree with the OP, more of these excellent palettes would be great,
I've attached the "inferno", "magma", and "plasma" colour ramps, which can be copied into $GISBASE/etc/colors/
I guess I'd be interested to know if they would be best added to trunk, or moved into a dedicated add-on (I strongly advocate for the first option, since using perceptually uniform palettes is good GIS practice).
comment:3 by , 6 years ago
Make sense to me. The main reason I did not include these with viridis was that they are so similar to each other (yet different enough to just pick one). Any opinion about that?
For the inclusion into do the source code, please provide a comment similar to what we have for viridis: source:grass/trunk/lib/gis/colors/viridis
Note also that the grass
color table is also perceptually uniform (comment:27:ticket:3043).
Finally, if you have further ideas about color tables in GRASS GIS, consider looking into what can be done for version 8 (e.g. #3055).
comment:4 by , 6 years ago
Keywords: | inferno magma plasma added |
---|---|
Milestone: | 7.2.4 → 7.6.0 |
comment:5 by , 6 years ago
Those palettes all share the same core characteristics: colorful, perceptually uniform, and robust to colorblindness.
In my view, I like to switch between these depending on the data I am representing -- for example I tend to prefer magma
or inferno
to viridis
to represent say temperature. I've found it useful to have access to those different palettes and adapt to the context -- or sometimes it might just boil down to personal preferences I suppose (how does one use magma
and not think of Dr. Evil in Austin Powers??).
More background/illustrations of those palettes: https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html#the-color-scales
Suggested comments:
For inferno:
# perceptually uniform and sequential # contains black, red and yellow # color table developed for Matplotlib (default in 2.0) # license of the original data: CC0 # original authors: Nathaniel J. Smith, Stefan van der Walt, Eric Firing # created from cpt-city mpl inferno (r.cpt2grass -s)
For magma:
# perceptually uniform and sequential # contains pale yellow, purple and black # color table developed for Matplotlib (default in 2.0) # license of the original data: CC0 # original authors: Nathaniel J. Smith, Stefan van der Walt, Eric Firing # created from cpt-city mpl inferno (r.cpt2grass -s)
For plasma:
# perceptually uniform and sequential # contains blue, pink and yellow # color table developed for Matplotlib (default in 2.0) # license of the original data: CC0 # original authors: Nathaniel J. Smith, Stefan van der Walt, Eric Firing # created from cpt-city mpl inferno (r.cpt2grass -s)
"inferno" colour ramp