inst/examples/ex-scale_economist_seq.R

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")

Try the ggthemes package in your browser

Any scripts or data that you put into this service are public.

ggthemes documentation built on Oct. 4, 2026, 1:06 a.m.