Set default ggplot2 style when no aesthetics are used. Run by default at startup of ggcognigen

set_default_style(style = cognigen_style())

Arguments

style

list of style elements, liked one return by cognigen_style or read_style. Alternatively, style can be set to 'ggplot2' to revert to the defaults of the ggplot2 package.

Value

updates elements of default ggplot2 style then invisibly returns NULL

Examples

library(ggplot2)

# set the style to ggcognigen style
set_default_style()

ggplot(mpg, aes(class, hwy)) +
  geom_point()


# revert back to ggplot2 style
set_default_style(style = 'ggplot2')
ggplot(mpg, aes(class, hwy)) +
  geom_point()


# again, set the style to ggcognigen style
set_default_style()