4 ms·
The article is quite useful, although the examples near the end are all sequential, not diverging. Maybe the blogger got busy with something else. Anyway, the
by bluenose69 3y ago
The article is quite useful, although the examples near the end are all sequential, not diverging. Maybe the blogger got busy with something else. Anyway, the below demonstrates the 2 recommended diverging palettes.
n <- 100
m <- matrix(seq(-1, 1, length.out=n), nrow=1)
par(mfrow=c(1, 2))
for (p in c("Purple-Green", "Blue-Red 3")) {
image(m, col=hcl.colors(n+1, palette=p))
mtext(p)
}
In case it's of interest, I am putting two citations below. The first discusses colour schemes suitable for plotting various oceanographic quantities (or anything, really), and the second deals with an R package that provides these colours chemes.
1. Thyng, Kristen, Chad Greene, Robert Hetland, Heather Zimmerle, and Steven DiMarco. “True Colors of Oceanography: Guidelines for Effective and Accurate Colormap Selection.” Oceanography 29, no. 3 (September 1, 2016): 9–13. https://doi.org/10.5670/oceanog.2016.66 https://doi.org/10.5670/oceanog.2016.66.
2. Thyng, Kristen M. “The Importance of Colormaps.” Computing in Science Engineering 22, no. 5 (September 2020): 96–102. https://doi.org/10.1109/MCSE.2020.3006946 https://doi.org/10.1109/MCSE.2020.3006946.
Thyng, Kristen, Clark Richards, and Ivan Krylov. “Cmocean: Beautiful Colour Maps for Oceanography,” May 6, 2019. https://CRAN.R-project.org/package=cmocean https://CRAN.R-project.org/package=cmocean.
- jjgreen 3y agoThyng's splendid gradients are available in several formats at cpt-city: http://soliton.vm.bytemark.co.uk/pub/cpt-city/cmocean/index.html http://soliton.vm.bytemark.co.uk/pub/cpt-city/cmocean/index....