Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pal.volcano

Show a colormap with a surface of volcano elevation


Description

Some palettes with dark colors at one end of the palette hide the shape of the volcano in the dark colors. Viridis is bad.

Usage

pal.volcano(pal, n = 100, main = "")

Arguments

pal

A palette function or a vector of colors.

n

The number of colors to display for palette functions.

main

Main title

Details

What to look for:

1. Can you locate the highest point on the volcano?

2. Are the upper-right and lower-right corners the same elevation?

3. Do any Mach bands circle the peak?

Value

None.

Examples

pal.volcano(parula)
pal.volcano(brewer.rdbu) # Mach banding is bad
pal.volcano(warmcool, main="warmcool") # No Mach band 
pal.volcano(rev(viridis(100))) # Bad: peak position is hidden

pals

Color Palettes, Colormaps, and Tools to Evaluate Them

v1.7
GPL-3
Authors
Kevin Wright [aut, cre] (<https://orcid.org/0000-0002-0617-8673>)
Initial release
2021-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.