dscale: Discrete scale.

Description Usage Arguments Examples

View source: R/scale-discrete.r

Description

Discrete scale.

Usage

1
dscale(x, palette, na.value = NA)

Arguments

x

vector of discrete values to scale

palette

aesthetic palette to use

na.value

aesthetic to use for missing values

Examples

1
2
with(mtcars, plot(disp, mpg, pch = 20, cex = 3,
  col = dscale(factor(cyl), brewer_pal())))

scales documentation built on Aug. 10, 2018, 1:17 a.m.