Description Usage Arguments Details Palettes Examples
The ‘auth0' scales provides color palettes provided by Auth0’s design team. They are meant to be used in combination with the auth0_theme in ggplot2
1 2 3 4 5 6 7 8 9 10 11 | scale_color_auth0_discrete(..., palette = "default", direction = 1,
aesthetics = "colour")
scale_fill_auth0_discrete(..., palette = "default", direction = 1,
aesthetics = "fill")
scale_fill_auth0_gradient(..., midpoint = 0, space = "Lab",
na.value = "grey50", guide = "colourbar", aesthetics = "fill")
scale_color_auth0_gradient(..., midpoint = 0, space = "Lab",
na.value = "grey50", guide = "colourbar", aesthetics = "colour")
|
... |
Other arguments passed on to [discrete_scale()] to control name, limits, breaks, labels and so forth. |
palette |
The palette to use, if left empty will use the default one, you can also choose the sequential one if the value is ordinal, or colorful to use many different colors. |
direction |
The direction to use, if -1 will return the colors in opposite order |
aesthetics |
The aesthetic to apply this scale on |
midpoint |
The mid value on gradients, should always set this to the mean or median of the value to colour. |
space |
colour space in which to calculate gradient. Must be "Lab" - other values are deprecated. |
na.value |
Colour to use for missing values |
guide |
Type of legend. Use "colourbar" for continuous colour bar, or "legend" for discrete colour legend. |
The 'auth0' scales were carefully designed and tested on discrete data.
The following palettes are available for use with these scales:
Default palette alternating between colors ranging from yellow to orange
Colors ordered from lighter to darker, meant for ordinal variables
Colorful alternative respecting Auth0's style
1 2 3 4 5 6 7 8 9 10 11 12 | ggplot(diamonds, aes(clarity, fill = cut)) +
geom_bar() +
theme_auth0() +
scale_fill_auth0_discrete(palette='colorful')
ggplot(diamonds, aes(x= cut, y = depth, color = cut)) +
geom_violin(fill = '#fffffa') +
theme_auth0() +
scale_color_auth0_discrete()
ggplot(diamonds, aes(x= depth, y = price, color = price)) +
geom_point() + theme_auth0() + scale_color_auth0_gradient(midpoint=10000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.