scale_alpha: Alpha transparency scales

Description Usage Arguments See Also Examples

View source: R/scale-alpha.r

Description

Alpha-transparency scales are not tremendously useful, but can be a convenient way to visually down-weight less important observations. scale_alpha is an alias for scale_alpha_continuous since that is the most common use of alpha, and it saves a bit of typing.

Usage

1
2
3
4
5

Arguments

...

Other arguments passed on to continuous_scale or discrete_scale as appropriate, to control name, limits, breaks, labels and so forth.

range

Output range of alpha values. Must lie between 0 and 1.

See Also

Other colour scales: scale_colour_brewer, scale_colour_gradient, scale_colour_grey, scale_colour_hue

Examples

1
2
3
4
5
6
p <- ggplot(mpg, aes(displ, hwy)) +
  geom_point(aes(alpha = year))

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

ggplot2 documentation built on May 20, 2017, 12:35 a.m.

Search within the ggplot2 package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.