View source: R/ggplot2_colour_layer.R
scale_colour_academic_d | R Documentation |
Scale Plot Colours With Academic Themes (Discrete)
scale_colour_academic_d(palette_name, ...)
palette_name |
The name of a colour palette in |
... |
Arguments passed to |
A layer that can be added to a ggplot2 object.
library(ggplot2)
ggplot(
data.frame(
x = runif(1500),
y = runif(1500),
c = sample(LETTERS[1:3], 1500, replace = TRUE)
),
aes(x = x, y = y, colour = c)
) +
geom_point() +
scale_colour_academic_d("cruk") +
theme_classic() +
labs(
x = "X-Axis",
y = "Y-Axis",
colour = "Colour"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.