Learn R Programming

khroma (version 1.3.0)

plot: Plot Colour Scheme

Description

plot_scheme shows colours in a plot.

Usage

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

plot_map(x)

Arguments

x

A character vector of colours.

colours

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

names

A logical scalar: should the name of the colours 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 par.

Details

plot_map produces a diagnostic map for a given colour scheme.

See Also

Other diagnostic tools: convert

Examples

Run this code
# NOT RUN {
## 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))
# }

Run the code above in your browser using DataLab