Learn R Programming

broman (version 0.94)

plot_crayons: Illustration of crayon colors

Description

Creates a plot of the crayon colors in brocolors()

Usage

plot_crayons(
  colors = NULL,
  method2order = c("hsv", "cluster"),
  cex = NULL,
  mar = rep(0.1, 4),
  bg = "white",
  fg = "black",
  border = FALSE
)

Value

None

Arguments

colors

Set of colors to display, by name or RGB code; must be a subset of the crayons() colors.

method2order

method to order colors ("hsv" or "cluster")

cex

character expansion for the text

mar

margin paramaters; vector of length 4 (see graphics::par())

bg

Background color

fg

Foreground color (for text and box outlines)

border

If TRUE, plot a border around each rectangle

References

https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors

See Also

brocolors()

Examples

Run this code
plot_crayons()
plot_crayons("blue", cex=1) # plot just those that match "blue"
plot_crayons("green", cex=1) # plot just those that match "green"

Run the code above in your browser using DataLab