update_labels: Update axis/legend labels

Description Usage Arguments Examples

View source: R/labels.r

Description

Update axis/legend labels

Usage

1

Arguments

p

plot to modify

labels

named list of new labels

Examples

1
2
3
4
5
p <- ggplot(mtcars, aes(mpg, wt)) + geom_point()
update_labels(p, list(x = "New x"))
update_labels(p, list(x = expression(x / y ^ 2)))
update_labels(p, list(x = "New x", y = "New Y"))
update_labels(p, list(colour = "Fail silently"))

SahaRahul/ggplot2 documentation built on May 17, 2019, 1:46 p.m.