Description Usage Arguments Examples
Setup colour palette for ggplot2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | scale_color_uos(
...,
palette = "marine",
discrete = TRUE,
alpha = 1,
reverse = FALSE
)
scale_colour_uos(
...,
palette = "marine",
discrete = TRUE,
alpha = 1,
reverse = FALSE
)
|
... |
additional arguments to pass to scale_color_gradientn |
palette |
Choose from 'uos_palettes' list |
discrete |
whether to use a discrete colour palette |
alpha |
transparency |
reverse |
logical, Reverse the order of the colours? |
1 2 3 4 5 6 7 8 9 10 11 12 | library(tidyverse)
ggplot(mtcars, aes(mpg, wt)) +
geom_point(aes(colour = factor(cyl))) +
scale_colour_uos(palette="marine")
ggplot(mtcars, aes(mpg, wt)) +
geom_point(aes(colour = hp)) +
scale_colour_uos(palette="horizon", discrete = FALSE)
ggplot(data = mpg) +
geom_point(mapping = aes(x = displ, y = hwy, color = class)) +
scale_colour_uos(palette="marine")
ggplot(diamonds) + geom_bar(aes(x = cut, fill = clarity)) +
scale_fill_uos()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.