diff --git a/man/ggtheme.Rd b/man/ggtheme.Rd index a54289cec5..2a1c1bee64 100644 --- a/man/ggtheme.Rd +++ b/man/ggtheme.Rd @@ -97,14 +97,43 @@ for new features.} } } \examples{ -p <- ggplot(mtcars) + geom_point(aes(x = wt, y = mpg, - colour = factor(gear))) + facet_wrap(~am) -p + theme_gray() # the default -p + theme_bw() -p + theme_linedraw() -p + theme_light() -p + theme_dark() -p + theme_minimal() -p + theme_classic() -p + theme_void() +mtcars2 <- within(mtcars, { + vs <- factor(vs, labels = c("V-shaped", "Straight")) + am <- factor(am, labels = c("Automatic", "Manual")) + cyl <- factor(cyl) + gear <- factor(gear) +}) + +p1 <- ggplot(mtcars2) + + geom_point(aes(x = wt, y = mpg, colour = gear)) + + labs(title = "Fuel economy declines as weight increases", + subtitle = "(1973-74)", + caption = "Data from the 1974 Motor Trend US magazine.", + tag = "Figure 1", + x = "Weight (1000 lbs)", + y = "Fuel economy (mpg)", + colour = "Gears") + +p1 + theme_gray() # the default +p1 + theme_bw() +p1 + theme_linedraw() +p1 + theme_light() +p1 + theme_dark() +p1 + theme_minimal() +p1 + theme_classic() +p1 + theme_void() + +# Theme examples with panels +\donttest{ +p2 <- p1 + facet_grid(vs ~ am) + +p2 + theme_gray() # the default +p2 + theme_bw() +p2 + theme_linedraw() +p2 + theme_light() +p2 + theme_dark() +p2 + theme_minimal() +p2 + theme_classic() +p2 + theme_void() +} } diff --git a/man/scale_brewer.Rd b/man/scale_brewer.Rd index ed49715310..b7f0071dc1 100644 --- a/man/scale_brewer.Rd +++ b/man/scale_brewer.Rd @@ -34,7 +34,7 @@ limits, breaks, labels and so forth.} index into the list of palettes of appropriate \code{type}} \item{direction}{Sets the order of colors in the scale. If 1, the default, -colors are as output by \code{\link[RColorBrewer:brewer.pal]{RColorBrewer::brewer.pal()}}. If -1, the +colors are as output by \code{\link[RColorBrewer]{brewer.pal}}. If -1, the order of colors is reversed.} \item{aesthetics}{Character string or vector of character strings listing the @@ -44,7 +44,7 @@ same time, via \code{aesthetics = c("colour", "fill")}.} \item{values}{if colours should not be evenly positioned along the gradient this vector gives the position (between 0 and 1) for each colour in the -\code{colours} vector. See \code{\link[=rescale]{rescale()}} for a convience function +\code{colours} vector. See \code{\link{rescale}} for a convience function to map an arbitrary range to between 0 and 1.} \item{space}{colour space in which to calculate gradient. Must be "Lab" - diff --git a/man/scale_gradient.Rd b/man/scale_gradient.Rd index b2ee2bce6f..9ab3342fb3 100644 --- a/man/scale_gradient.Rd +++ b/man/scale_gradient.Rd @@ -128,7 +128,7 @@ Defaults to 0.} \item{values}{if colours should not be evenly positioned along the gradient this vector gives the position (between 0 and 1) for each colour in the -\code{colours} vector. See \code{\link[=rescale]{rescale()}} for a convience function +\code{colours} vector. See \code{\link{rescale}} for a convience function to map an arbitrary range to between 0 and 1.} } \description{