Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (20 sloc) 0.475 kb
\title{Update axis/legend labels}
update_labels(p, labels)
\item{p}{plot to modify}
\item{labels}{named list of new labels}
Update axis/legend labels
p <- qplot(mpg, wt, data = mtcars)
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"))
Jump to Line
Something went wrong with that request. Please try again.