Permalink
Browse files

scale_linetype_discrete, default to na.value='blank'

Fixes #711
  • Loading branch information...
1 parent 0eb56e8 commit d9efd59b5fc6d00cd6b1237ecc20223e4353165c @wch wch committed Oct 29, 2012
Showing with 9 additions and 4 deletions.
  1. +4 −2 R/scale-linetype.r
  2. +5 −2 man/scale_linetype.Rd
View
@@ -5,6 +5,7 @@
#' values.
#'
#' @inheritParams scale_x_discrete
+#' @param na.value The linetype to use for \code{NA} values.
#' @rdname scale_linetype
#' @export
#' @examples
@@ -19,8 +20,9 @@
#' qplot(date, value, data=ecm, geom="line", colour=variable)
#'
#' # See scale_manual for more flexibility
-scale_linetype <- function(...) {
- discrete_scale("linetype", "linetype_d", linetype_pal(), ...)
+scale_linetype <- function(..., na.value = "blank") {
+ discrete_scale("linetype", "linetype_d", linetype_pal(),
+ na.value = na.value, ...)
}
#' @rdname scale_linetype
View
@@ -4,13 +4,16 @@
\alias{scale_linetype_discrete}
\title{Scale for line patterns.}
\usage{
- scale_linetype(...)
+ scale_linetype(..., na.value = "blank")
scale_linetype_continuous(...)
- scale_linetype_discrete(...)
+ scale_linetype_discrete(..., na.value = "blank")
}
\arguments{
+ \item{na.value}{The linetype to use for \code{NA}
+ values.}
+
\item{...}{common discrete scale parameters: \code{name},
\code{breaks}, \code{labels}, \code{na.value},
\code{limits} and \code{guide}. See

0 comments on commit d9efd59

Please sign in to comment.