update_labels: Update axis/legend labels

View source: R/labels.R

update_labelsR Documentation

Update axis/legend labels

Description

Update axis/legend labels

Usage

update_labels(p, labels)

Arguments

p

plot to modify

labels

named list of new labels

Examples

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"))

ggplot2 documentation built on June 22, 2024, 11:35 a.m.