| scale_colour_ptol | R Documentation |
These scales were deprecated in ggthemes 7.0.0. Use the khroma package instead, which tracks Paul Tol's colour schemes as he revises them.
They draw the 12-colour qualitative scheme from Tol's 2012 technical note,
and have not followed the revisions he has made since. His current schemes
are at https://sronpersonalpages.nl/~pault/; the closest successor is
khroma::scale_colour_muted().
See ptol_pal(). These palettes support up to 12 values.
scale_colour_ptol(...)
scale_color_ptol(...)
scale_fill_ptol(...)
... |
Arguments passed on to
|
A ggplot2 scale object.
Other colour ptol:
ptol_pal()
library("ggplot2")
p2 <- ggplot(mtcars, aes(x = wt, y = mpg, colour = factor(gear))) +
geom_point() +
geom_smooth(method = "lm", se = FALSE) +
scale_color_ptol("cyl") +
theme_minimal() +
ggtitle("Cars")
ggplot(diamonds, aes(x = clarity, fill = cut)) +
geom_bar() +
scale_fill_ptol() +
theme_minimal()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.