scale_colour_tntp | R Documentation |
These functions are deprecated. Please use
scale_color_manual(values = tntp_palette(palette_name))
or
scale_fill_manual(values = tntp_palette(palette_name))
instead.
scale_colour_tntp(palette = palette_names, ...)
scale_color_tntp(palette = palette_names, ...)
scale_fill_tntp(palette = palette_names, ...)
palette |
character string describing the desired palette from |
... |
other arguments to pass through to ggplot2::discrete_scale() |
a ggplot Scale object
library(ggplot2)
library(dplyr)
x <- mtcars |>
count(cyl, am) |>
mutate(am = as.factor(am))
ggplot(x, aes(x = cyl, y = n, fill = am)) + # you need a fill aesthetic
geom_col() +
scale_fill_manual(values = tntp_palette())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.