File: scale_alpha.Rd

package info (click to toggle)
r-cran-ggplot2 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,412 kB
  • sloc: sh: 9; makefile: 1
file content (35 lines) | stat: -rw-r--r-- 1,010 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{scale_alpha}
\alias{scale_alpha}
\alias{scale_alpha_continuous}
\alias{scale_alpha_discrete}
\title{Alpha scales.}
\usage{
scale_alpha(..., range = c(0.1, 1))

scale_alpha_continuous(..., range = c(0.1, 1))

scale_alpha_discrete(..., range = c(0.1, 1))
}
\arguments{
\item{...}{Other arguments passed on to \code{\link{continuous_scale}}
or \code{\link{discrete_scale}} as appropriate, to control name, limits,
breaks, labels and so forth.}

\item{range}{range of output alpha values.  Should lie between 0 and 1.}
}
\description{
\code{scale_alpha} is an alias for \code{scale_alpha_continuous} since
that is the most common use of alpha, and it saves a bit of typing.
}
\examples{
(p <- qplot(mpg, cyl, data = mtcars, alpha = cyl))
p + scale_alpha("cylinders")
p + scale_alpha("number\\nof\\ncylinders")

p + scale_alpha(range = c(0.4, 0.8))

(p <- qplot(mpg, cyl, data=mtcars, alpha = factor(cyl)))
p + scale_alpha_discrete(range = c(0.4, 0.8))
}