update_labels | R Documentation |
Update axis/legend labels
update_labels(p, labels)
p |
plot to modify |
labels |
named list of new labels |
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.