| economist_seq_pal | R Documentation |
The Economist's "equal lightness colour scales": six ordered steps for each of the nine hues in the main chart palette, running darkest to lightest. Use them for ordered data, where the main palette is for unordered categories.
economist_seq_pal(hue = "blue")
economist_gradient_pal(hue = "blue")
hue |
|
economist_seq_pal() returns the six steps themselves, for
discrete ordered data. economist_gradient_pal() interpolates
between them, for continuous data.
economist_seq_pal() returns a palette function that takes the number of colours n and
returns the first n of the six hex colours for hue, for use with
discrete_scale(). economist_gradient_pal() returns a palette function that
takes a numeric vector x of values between 0 and 1 and returns hex colours interpolated between
those steps, for use with continuous_scale().
Other colour economist:
economist_pal(),
scale_colour_economist(),
scale_colour_economist_c()
library("scales")
# the six steps of one hue, darkest first
show_col(economist_seq_pal("blue")(6))
show_col(economist_seq_pal("red")(6))
# interpolated for continuous data
show_col(economist_gradient_pal("green")(seq(0, 1, length.out = 10)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.