| scale_colour_economist_c | R Documentation |
Color scales built from The Economist's equal-lightness color scales.
The _c scales are continuous; the _ordinal scales are
discrete, for ordered factors. See scale_colour_economist()
for the unordered categorical scales.
scale_colour_economist_c(hue = "blue", guide = "colourbar", ...)
scale_color_economist_c(hue = "blue", guide = "colourbar", ...)
scale_fill_economist_c(hue = "blue", guide = "colourbar", ...)
scale_colour_economist_ordinal(hue = "blue", ...)
scale_color_economist_ordinal(hue = "blue", ...)
scale_fill_economist_ordinal(hue = "blue", ...)
hue |
|
guide |
Type of legend. Use |
... |
Other arguments passed on to the underlying scale. |
A ggplot2 scale object.
Other colour economist:
economist_pal(),
economist_seq_pal(),
scale_colour_economist()
library("ggplot2")
# Continuous scale
ggplot(mtcars, aes(x = wt, y = mpg, colour = disp)) +
geom_point(size = 3) +
scale_colour_economist_c(hue = "blue")
# Ordinal (discrete) scale for an ordered factor
ggplot(mtcars, aes(x = wt, y = mpg, colour = factor(cyl, ordered = TRUE))) +
geom_point(size = 3) +
scale_colour_economist_ordinal(hue = "red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.