Skip to contents

See pal_diverging for details.

Usage

scale_colour_diverging(
  ...,
  alpha = 1,
  reverse = TRUE,
  discrete = FALSE,
  palette = c("blue_green", "blue_yellow", "blue_red")
)

scale_fill_diverging(
  ...,
  alpha = 1,
  reverse = TRUE,
  discrete = FALSE,
  palette = c("blue_green", "blue_yellow", "blue_red")
)

scale_color_diverging(
  ...,
  alpha = 1,
  reverse = TRUE,
  discrete = FALSE,
  palette = c("blue_green", "blue_yellow", "blue_red")
)

Arguments

...

additional parameters for discrete_scale

alpha

Transparency level, a real number in (0, 1]. See alpha in rgb for details.

reverse

The default, FALSE, generates the colour palette as defined, while TRUE generates the colour palette in reverse order.

discrete

data Whether data the palette is being applied to is discrete or continuous.

palette

Currently there are two diverging colour palettes available: "blue_green" (a 9-colour blue-grey-green palette using NHS Blue, NHS Pale Grey, and NHS Aqua Green), blue_yellow_red (a 9-colour blue-yellow-red palette using NHS Blue and NHS Pale Grey), and blue_red (a 9-colour blue-to-red palette uses NHS Blue and NHS Pale Grey).