View source: R/scale-discrete.r
dscale | R Documentation |
Discrete scale
dscale(x, palette, na.value = NA)
x |
vector of discrete values to scale |
palette |
aesthetic palette to use |
na.value |
aesthetic to use for missing values |
with(mtcars, plot(disp, mpg, pch = 20, cex = 3, col = dscale(factor(cyl), brewer_pal()) ))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.