This package includes additional themes and scales for ggplot2 based on popular color schemes, as well as tools to easily make your own. For a proper introduction, read the package vignette.
The package is not on CRAN, but you can install it directly from github using
devtools::install_github("kssrr/ggschemes")
ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species, shape = Species)) +
geom_point(size = 4) +
theme_dracula_dark_horizontal() +
scale_color_dracula(palette = "dark") +
labs(
title = "Sepal Length vs. Sepal Width",
subtitle = "...for Various Species of Iris",
x = "Sepal Width",
y = "Sepal Length"
)
ggplot(mtcars, aes(wt, mpg, color = factor(cyl), shape = factor(cyl))) +
geom_point(size = 4) +
theme_monokai_dark() +
scale_color_monokai(palette = "dark") +
labs(
title = "Car Weight vs. Miles per Gallon",
subtitle = "...and number of cylinders",
x = "Weight",
y = "Miles per Gallon",
color = "Cylinders",
shape = "Cylinders"
)
ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species, shape = Species)) +
geom_point(size = 4) +
theme_dracula_light_horizontal() +
scale_color_dracula() +
labs(
title = "Sepal Length vs. Sepal Width",
subtitle = "...for Various Species of Iris",
x = "Sepal Width",
y = "Sepal Length"
)
ggplot(mpg, aes(cty, hwy)) +
geom_smooth(
method = "lm",
color = gruvbox$light("lightblue"),
se = FALSE
) +
geom_count(color = gruvbox$light("red"), show.legend = FALSE) +
theme_gruvbox_light_horizontal() +
labs(
title = "City vs. Highway Mileage",
subtitle = "...for cars from various manufacturers",
x = "City mileage",
y = "Highway mileage",
n = "Count"
)
So far, the package includes three color schemes: Gruvbox, Dracula and Monokai, each with a light and dark variant.