Scale Plot Colours With Academic Themes (Discrete)
Source:R/ggplot2_colour_layer.R
scale_colour_academic_d.Rd
Scale Plot Colours With Academic Themes (Discrete)
Arguments
- palette_name
The name of a colour palette in
AcademicThemes
.- ...
Arguments passed to
ggplot2::discrete_scale()
.
Examples
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"
)