plotflow (version 0.2.1)

ggplot_global_set_color: Globally Set ggplot2 Colors/Fills

Description

Globally set the color and fill of ggplot2.

Usage

ggplot_global_set_color(color = "black", alter.fill = TRUE,
  alter.color = TRUE, reset = TRUE)

Arguments

color

A single color character string.

alter.fill

logical. If TRUE fill is globally altered.

alter.color

logical. If TRUE colour is globally altered.

reset

logical. If colour and fill are reset to black before applying new color.

References

http://stackoverflow.com/a/21175042/1000343

See Also

update_geom_defaults

Examples

Run this code
# NOT RUN {
ggplot_global_set_color("purple")

ggplot(mtcars, aes(factor(cyl))) + geom_bar()
ggplot(mtcars, aes(hp, mpg, group = factor(cyl))) + geom_point()
# }

Run the code above in your browser using DataCamp Workspace