Skip to contents

Apply a discrete Persian color palette to the color aesthetic in ggplot2.

Usage

scale_color_persian_d(name, direction = 1, ...)

scale_color_persian(name, direction = 1, ...)

scale_colour_persian(name, direction = 1, ...)

scale_colour_persian_d(name, direction = 1, ...)

Arguments

name

Name of the Persian palette to use. Options include: "munich", "fery", "tehran", "leyli", "tabriz", "hooshang", "reyhaneh", "floral", "hamburg", "pooran", "abbas", "isfahan", "berlin" See persian_palettes for all available palette names.

direction

Sets the order of colors in the scale. If -1, the order of colors is reversed.

...

Additional arguments passed to discrete_scale.

Value

A ggplot2 scale object.

Examples

library(ggplot2)
ggplot(enamel, aes(x = group, y = ld_mean, color = group)) +
  geom_segment(aes(x = group, xend = group, y = 0, yend = ld_mean), linewidth = 1) +
  geom_point(size = 4) +
  scale_color_persian_d("isfahan")