theme_update {ggplot2}R Documentation

Get, set and update themes.

Description

These three functions get, set and update themes.

Usage

theme_update(...)

Arguments

...

Details

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

Author(s)

Hadley Wickham <h.wickham@gmail.com>

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 = theme_rect(colour = "pink"))
qplot(mpg, wt, data = mtcars)
theme_set(old)
theme_get()

qplot(mpg, wt, data=mtcars, colour=mpg) + 
opts(legend.position=c(0.95, 0.95), legend.justification = c(1, 1))
last_plot() + 
opts(legend.background = theme_rect(fill = "white", col="white", size =3))

[Package ggplot2 version 0.8.2 Index]