Description Usage Arguments Examples
The pbi
scales provide default, city park, classroom,
colorblind safe, electric, high contrast, sunset and twilight color schemes
from Microsoft Power BI. These are well suited to display discrete values.
The Microsoft PowerBI scales are not designed to be extended to continuous data.
1 2 3 4 5 6 7 8 9 10 | scale_color_pbi(..., palette = "classic", direction = 1, aesthetics = "colour")
scale_colour_pbi(
...,
palette = "classic",
direction = 1,
aesthetics = "colour"
)
scale_fill_pbi(..., palette = "classic", direction = 1, aesthetics = "fill")
|
... |
Other arguments passed on to |
palette |
A palette name from |
direction |
Sets the order of colours in the scale. If -1, the order of colours is reversed. Defaults to 1 |
aesthetics |
Character string or vector of character strings listing
the name(s) of the aesthetic(s) that this scale works with. This can be
useful, for example, to apply colour settings to the |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | if (require(ggplot2)) {
ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, color = Species)) +
geom_point(size = 4) +
theme_bw(base_family = "mono") +
scale_color_pbi(palette = "twilight")
ggplot(mpg, aes(x = manufacturer, fill = manufacturer)) +
geom_bar() +
scale_fill_pbi(palette = "colorblind safe") +
theme_bw(base_family = "serif") +
labs(x = "Manufacturer",
y = "Count",
title = "Manufacturer Counts",
subtitle = "Dodge is highest!")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.