Skip to contents

A few ranked levels. The palette ramps rather than contrasts, so the colours carry the order.

Usage

scale_colour_mariner_o(reverse = FALSE, ...)

scale_color_mariner_o(reverse = FALSE, ...)

scale_fill_mariner_o(reverse = FALSE, ...)

Arguments

reverse

Logical; if TRUE, reverse the ramp.

...

Further arguments for ggplot2::discrete_scale().

Value

A ggplot2 discrete scale object for ordered categories.

Examples

library(ggplot2)
mpg$size <- cut(mpg$displ, 3, labels = c("Small", "Medium", "Large"))
ggplot(mpg, aes(hwy, fill = size)) +
  geom_histogram(bins = 20) +
  scale_fill_mariner_o()