Skip to content
Browse files

Doc tweaks for discrete scales

  • Loading branch information...
1 parent 85dbee2 commit 4b497a05a779931c415463d469bde227c89c7bf7 @hadley committed Dec 29, 2011
Showing with 47 additions and 0 deletions.
  1. +7 −0 R/scale-discrete-.r
  2. +1 −0 R/scale-linetype.r
  3. +2 −0 R/scale-manual.r
  4. +2 −0 R/scale-shape.r
  5. +11 −0 man/scale_discrete.Rd
  6. +6 −0 man/scale_linetype.Rd
  7. +9 −0 man/scale_manual.Rd
  8. +9 −0 man/scale_shape.Rd
View
7 R/scale-discrete-.r
@@ -6,6 +6,13 @@
#' level, and increasing by one for each level (i.e. the labels are placed
#' at integer positions). This is what allows jittering to work.
#'
+#'
+#' @param ... common discrete scale parameters: \code{name}, \code{breaks},
+#' \code{labels}, \code{na.value}, \code{limits} and \code{guide}. See
+#' \code{\link{discrete_scale}} for more details
+#' @param expand a numeric vector of length two giving multiplicative and
+#' additive expansion constants. These constants ensure that the data is
+#' placed some distance away from the axes.
#' @rdname scale_discrete
#' @family position scales
#' @export
View
1 R/scale-linetype.r
@@ -4,6 +4,7 @@
#' University of Manchester. Line types can not be mapped to continuous
#' values.
#'
+#' @inheritParams scale_x_discrete
#' @rdname scale_linetype
#' @export
#' @examples
View
2 R/scale-manual.r
@@ -1,6 +1,8 @@
#' Create your own discrete scale.
#'
#' @rdname scale_manual
+#' @inheritParams scale_x_discrete
+#' @param values a set of aesthetic values to map data values to.
#' @export
#' @examples
#' p <- qplot(mpg, wt, data = mtcars, colour = factor(cyl))
View
2 R/scale-shape.r
@@ -2,6 +2,8 @@
#'
#' A continuous variable can not be mapped to shape.
#'
+#' @param solid Are the shapes solid, \code{TRUE}, or hollow \code{FALSE}?
+#' @inheritParams scale_x_discrete
#' @rdname scale_shape
#' @export
#' @examples
View
11 man/scale_discrete.Rd
@@ -7,6 +7,17 @@
scale_y_discrete(..., expand = c(0, 0.6))
}
+\arguments{
+ \item{...}{common discrete scale parameters: \code{name},
+ \code{breaks}, \code{labels}, \code{na.value},
+ \code{limits} and \code{guide}. See
+ \code{\link{discrete_scale}} for more details}
+
+ \item{expand}{a numeric vector of length two giving
+ multiplicative and additive expansion constants. These
+ constants ensure that the data is placed some distance
+ away from the axes.}
+}
\description{
You can use continuous positions even with a discrete
position scale - this allows you (e.g.) to place labels
View
6 man/scale_linetype.Rd
@@ -10,6 +10,12 @@
scale_linetype_discrete(...)
}
+\arguments{
+ \item{...}{common discrete scale parameters: \code{name},
+ \code{breaks}, \code{labels}, \code{na.value},
+ \code{limits} and \code{guide}. See
+ \code{\link{discrete_scale}} for more details}
+}
\description{
Default line types based on a set supplied by Richard
Pearson, University of Manchester. Line types can not be
View
9 man/scale_manual.Rd
@@ -22,6 +22,15 @@
scale_color_manual(..., values)
}
+\arguments{
+ \item{values}{a set of aesthetic values to map data
+ values to.}
+
+ \item{...}{common discrete scale parameters: \code{name},
+ \code{breaks}, \code{labels}, \code{na.value},
+ \code{limits} and \code{guide}. See
+ \code{\link{discrete_scale}} for more details}
+}
\description{
Create your own discrete scale.
}
View
9 man/scale_shape.Rd
@@ -10,6 +10,15 @@
scale_shape_continuous(...)
}
+\arguments{
+ \item{solid}{Are the shapes solid, \code{TRUE}, or hollow
+ \code{FALSE}?}
+
+ \item{...}{common discrete scale parameters: \code{name},
+ \code{breaks}, \code{labels}, \code{na.value},
+ \code{limits} and \code{guide}. See
+ \code{\link{discrete_scale}} for more details}
+}
\description{
A continuous variable can not be mapped to shape.
}

0 comments on commit 4b497a0

Please sign in to comment.
Something went wrong with that request. Please try again.