• plot() allows to quickly display a color scheme returned by colour().

  • plot_scheme() shows colors in a plot.

  • plot_map() produces a diagnostic map for a given color scheme.

  • plot_scheme_colorblind() shows colors in a plot with different types of simulated color blindness.

# S3 method for colour_scheme
plot(x, ...)

plot_scheme(x, colours = FALSE, names = FALSE, size = 1)

plot_map(x)

plot_scheme_colourblind(x)

plot_scheme_colorblind(x)

Arguments

x

A character vector of colors.

...

Currently not used.

colours

A logical scalar: should the hexadecimal representation of the colors be displayed?

names

A logical scalar: should the name of the colors be displayed?

size

A numeric value giving the amount by which plotting text should be magnified relative to the default. Works the same as cex parameter of graphics::par().

See also

Other diagnostic tools: compare(), convert()

Author

N. Frerebeau, V. Arel-Bundock

Examples

plot(colour("bright")(7))

plot(colour("smooth rainbow")(256))


## Plot colour schemes
plot_scheme(colour("bright")(7))

plot_scheme(colour("sunset")(11))

plot_scheme(colour("YlOrBr")(9))

plot_scheme(colour("discrete rainbow")(14))


## Plot diagnostic maps
plot_map(colour("bright")(7))

plot_map(colour("sunset")(11))

plot_map(colour("YlOrBr")(9))

plot_map(colour("discrete rainbow")(14))


## Plot simulated color blindness
plot_scheme_colorblind(colour("bright")(7))