Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Re-roxygenize

  • Loading branch information...
commit 54eeabbae71950b4d17501150a5a3eb7ac906b76 1 parent 4f5b5f6
@wch wch authored
View
1  NAMESPACE
@@ -83,6 +83,7 @@ export(ggplot)
export(ggplotGrob)
export(ggsave)
export(ggstructure)
+export(ggtitle)
export(guide_colorbar)
export(guide_colourbar)
export(guide_legend)
View
2  man/coord_polar.Rd
@@ -49,7 +49,7 @@ ggplot(df, aes(x = "", y = value, fill = variable)) +
geom_bar(width = 1) +
scale_fill_manual(values = c("red", "yellow")) +
coord_polar("y", start=pi / 3) +
- theme(title = "Pac man")
+ labs(title = "Pac man")
# Windrose + doughnut plot
movies$rrating <- cut_interval(movies$rating, length = 1)
View
7 man/labs.Rd
@@ -1,4 +1,5 @@
\name{labs}
+\alias{ggtitle}
\alias{labs}
\alias{xlab}
\alias{ylab}
@@ -9,6 +10,8 @@
xlab(label)
ylab(label)
+
+ ggtitle(label)
}
\arguments{
\item{...}{a list of new names in the form aesthetic =
@@ -19,9 +22,11 @@
}
\examples{
p <- qplot(mpg, wt, data = mtcars)
+p + labs(title = "New plot title")
p + labs(x = "New x label")
p + xlab("New x label")
p + ylab("New y label")
+p + ggtitle("New plot title")
# This should work indepdendently of other functions that modify the
# the scale names
@@ -33,6 +38,6 @@ p <- qplot(mpg, wt, data = mtcars, colour = cyl)
p + labs(colour = "Cylinders")
# Can also pass in a list, if that is more convenient
-p + labs(list(x = "X", y = "Y"))
+p + labs(list(title = "Title", x = "X", y = "Y"))
}
View
4 man/theme.Rd
@@ -76,10 +76,8 @@ p + xlab("Vehicle Weight") + ylab("Miles per Gallon")
# Or
p + labs(x = "Vehicle Weight", y = "Miles per Gallon")
-# Add a title to the plot
-p + theme(title = "Vehicle Weight-Gas Mileage Relationship")
# Change title appearance
-p <- p + theme(title = "Vehicle Weight-Gas Mileage Relationship")
+p <- p + labs(title = "Vehicle Weight-Gas Mileage Relationship")
p + theme(plot.title = element_text(size = 20))
p + theme(plot.title = element_text(size = 20, colour = "Blue"))
View
2  man/translate_qplot_base.Rd
@@ -143,7 +143,7 @@ last_plot() + scale_colour_gradientn(colours = terrain.colors(7))
# by box() can be controlled in a similar way by the panel.background and
# plot.background theme elements. Instead of using title(), the plot title is
# set with the title option. See ?theme for more theme elements.
-last_plot() + theme(title = "My Plot Title")
+last_plot() + labs(title = "My Plot Title")
}
}
View
2  man/translate_qplot_ggplot.Rd
@@ -79,6 +79,6 @@
# qplot() recognises the same options as plot does, and converts them to their
# ggplot2 equivalents. See ?theme for more on ggplot options
# qplot(x, y, data = data, main="title", asp = 1)
-# ggplot(data, aes(x, y)) + geom_point() + theme(title = "title", aspect.ratio = 1)
+# ggplot(data, aes(x, y)) + geom_point() + labs(title = "title") + theme(aspect.ratio = 1)
}
Please sign in to comment.
Something went wrong with that request. Please try again.