scrgb: Scale: colour (rgb) Scale continuous variables to red, green...

Description Usage Arguments Details Examples

View source: R/scale-cont-colour.r

Description

The RGB colour space is NOT perceptually uniform. Use this scale with care. It is extremely ill-advised to map variables to more than one of r, g, b, or a.

Usage

1
2
3
scrgb(plot, name = "", to = list())

scfillrgb(plot, name = "", to = list())

Arguments

plot

plot

name

namen of the scale (used in the legend)

to

named list of target ranges (r.to, g.to, b.to, a.to)

Details

Note: alpha mappings only work with the Quartz and PDF devices.

Examples

1
2
3
4
5
6
7
8
library(ggplot2movies)
p <- scrgb(ggplot(movies, aes=list(y=rating, x=year)))
ggpoint(p, list(r=year))
ggpoint(p, list(b=rating))
ggpoint(p, list(b=rating, r=1))
scrgb(ggpoint(p, list(b=rating, r=1)), list(b.to=c(0.25,0.75)))
ggpoint(p, list(b=rating, r=year))
ggpoint(p, list(b=rating, r=year, g=year))

hadley/ggplot1 documentation built on Aug. 19, 2019, 2:42 p.m.