Permalink
Browse files

Re-roxygenize

  • Loading branch information...
1 parent d3947b5 commit 80d7ff5c285aa78c9d7a9c52a8c49b8ddecddfe6 @wch wch committed Jul 4, 2012
Showing with 27 additions and 7 deletions.
  1. +7 −2 man/guide_colourbar.Rd
  2. +6 −1 man/guide_legend.Rd
  3. +7 −0 man/guides.Rd
  4. +7 −4 man/scale_manual.Rd
View
@@ -11,7 +11,7 @@
barwidth = NULL, barheight = NULL, nbin = 20,
raster = TRUE, ticks = TRUE, draw.ulim = TRUE,
draw.llim = TRUE, direction = NULL,
- default.unit = "line", reverse = FALSE, ...)
+ default.unit = "line", reverse = FALSE, order = 0, ...)
guide_colorbar(title = waiver(), title.position = NULL,
title.theme = NULL, title.hjust = NULL,
@@ -21,7 +21,7 @@
barwidth = NULL, barheight = NULL, nbin = 20,
raster = TRUE, ticks = TRUE, draw.ulim = TRUE,
draw.llim = TRUE, direction = NULL,
- default.unit = "line", reverse = FALSE, ...)
+ default.unit = "line", reverse = FALSE, order = 0, ...)
}
\arguments{
\item{barwidth}{A numeric or a unit object specifying the
@@ -106,6 +106,11 @@
\item{label.vjust}{A numeric specifying vertical
justification of the label text.}
+
+ \item{order}{positive integer less that 99 that specify
+ the order of this guide in the multiple guides. If 0
+ (default), the order is determined by a secret
+ algorithm.}
}
\value{
A guide object
View
@@ -10,7 +10,7 @@
keywidth = NULL, keyheight = NULL, direction = NULL,
default.unit = "line", override.aes = list(),
nrow = NULL, ncol = NULL, byrow = FALSE,
- reverse = FALSE, ...)
+ reverse = FALSE, order = 0, ...)
}
\arguments{
\item{title}{A character string or expression indicating
@@ -85,6 +85,11 @@
\item{reverse}{logical. If \code{TRUE} the order of
legends is reversed.}
+ \item{order}{positive integer less that 99 that specify
+ the order of this guide in the multiple guides. If 0
+ (default), the order is determined by a secret
+ algorithm.}
+
\item{...}{ignored.}
}
\value{
View
@@ -50,6 +50,13 @@ p + theme(legend.position = "bottom")
# position of guides
p + theme(legend.position = "bottom", legend.box = "horizontal")
+
+# Set order for multiple guides
+
+qplot(data = mpg, x = displ, y = cty, size = hwy, colour = cyl, shape = drv) +
+ guides(colour = guide_colourbar(order = 1),
+ alpha = guide_legend(order = 2),
+ size = guide_legend(order = 3))
}
}
\seealso{
View
@@ -26,10 +26,9 @@
\item{values}{a set of aesthetic values to map data
values to. If this is a named vector, then the values
will be matched based on the names. If unnamed, values
- will be matched in order (usually alphabetical, but could
- be modified with the limits argument to the scale). Any
- data values that don't match, will be given
- \code{na.value}.}
+ will be matched in order (usually alphabetical) with the
+ limits of the scale. Any data values that don't match
+ will be given \code{na.value}.}
\item{...}{common discrete scale parameters: \code{name},
\code{breaks}, \code{labels}, \code{na.value},
@@ -61,6 +60,10 @@ p + scale_colour_manual(values = cols, breaks = c("4", "6", "8"),
# And limits to control the possible values of the scale
p + scale_colour_manual(values = cols, limits = c("4", "8"))
p + scale_colour_manual(values = cols, limits = c("4", "6", "8", "10"))
+
+# Notice that the values are matched with limits, and not breaks
+p + scale_colour_manual(limits = c(6, 8, 4), breaks = c(8, 4, 6),
+ values = c("grey50", "grey80", "black"))
}
}

0 comments on commit 80d7ff5

Please sign in to comment.