theme_update

0th

Percentile

Get, set and update themes.

Use theme_update to modify a small number of elements of the current theme or use theme_set to completely override it.

Usage
theme_update(...)

theme_get()

theme_set(new)

Arguments
...
named list of theme settings
new
new theme (a list of theme elements)
See Also

%+replace% and +.gg

Aliases
  • theme_get
  • theme_set
  • theme_update
Examples
qplot(mpg, wt, data = mtcars)
old <- theme_set(theme_bw())
qplot(mpg, wt, data = mtcars)
theme_set(old)
qplot(mpg, wt, data = mtcars)

old <- theme_update(panel.background = element_rect(colour = "pink"))
qplot(mpg, wt, data = mtcars)
theme_set(old)
theme_get()

qplot(mpg, wt, data=mtcars, colour=mpg) +
  theme(legend.position=c(0.95, 0.95), legend.justification = c(1, 1))
last_plot() +
 theme(legend.background = element_rect(fill = "white", colour = "white", size = 3))
Documentation reproduced from package ggplot2, version 0.9.3.1, License: GPL-2

Community examples

Looks like there are no examples yet.