ggplot2-scales-discrete {MexBrewer}R Documentation

Discrete MexBrewer scales for use with ggplot2

Description

Functions scale_color_mex_d and scale_fill_mex_d enable the use of MexBrewer colors with ggplot2 discrete scales.

Usage

scale_color_mex_d(palette_name, direction = 1, override.order = FALSE, ...)

scale_colour_mex_d(palette_name, direction = 1, override.order = FALSE, ...)

scale_fill_mex_d(palette_name, direction = 1, override.order = FALSE, ...)

Arguments

palette_name

Name of Palette. Choices are: Alacena, Atentado, Aurora, Casita1, Casita2, Casita3, Concha, Frida, Huida, Maiz, Naturaleza,Ofrenda, Revolucion, Ronda, Taurus1, Taurus2,Tierra, Vendedora.

direction

Sets order of colors. Default palette is 1. If direction is -1, palette color order is reversed

override.order

Colors are picked from palette to maximize readability and aesthetics. This means that colors are not always selected in sequential order from the full palette. If override.order is set to TRUE, colors are selected in sequential order from the full palette instead. Default is FALSE.

...

Other arguments passed on to discrete_scale

Value

A ScaleDiscrete object that can be added to a ggplot object

See Also

Other color scales: ggplot2-scales-continuous

Examples

library(ggplot2)
ggplot(data=iris, aes(x=Species, y=Sepal.Length, fill=Species)) +
geom_violin() +
scale_fill_mex_d("Aurora")

[Package MexBrewer version 0.0.2 Index]