drsimonj_palettes | R Documentation |
A collection of colour palettes
drsimonj_palettes
An object of class list
of length 5.
# Make an x-y plot using the drsimonj palette
library(ggplot2)
df <- data.frame(x = rnorm(100, 0, 20),
y = rnorm(100, 0, 20),
cl = sample(letters[1:8], 100, replace=TRUE))
ggplot(df, aes(x, y, colour = cl, shape = cl)) +
geom_point(size = 4) +
scale_colour_drsimonj() +
theme_minimal() +
theme(aspect.ratio = 1)
ggplot(df, aes(x, fill = cl)) +
geom_histogram() +
scale_fill_drsimonj(palette = "mixed")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.