scale_colour_nhsbsa: Scale colour an NHSBSA ggplot using the NHSBSA colour...

View source: R/colour_nhsbsa.R

scale_colour_nhsbsaR Documentation

Scale colour an NHSBSA ggplot using the NHSBSA colour palette.

Description

Scale colour an NHSBSA ggplot using the NHSBSA colour palette.

Usage

scale_colour_nhsbsa(palette = NA, n_discrete = 0, reverse = FALSE, ...)

Arguments

palette

String type of colour palette. Default is NA, otherwise should be one one c("gender", "gradient", "highlight").

n_discrete

Integer number of discrete categories (if any). Default is 0.

reverse

Boolean, to reverse the palette. Default is FALSE.

...

arguments to pass on

Value

colour palette

Examples

ggplot2::ggplot(data = ggplot2::diamonds) +
  ggplot2::geom_point(
    mapping = ggplot2::aes(x = carat, y = price, col = carat)
  ) +
  nhsbsaR::scale_colour_nhsbsa(palette = "gradient")

nhsbsa-data-analytics/nhsbsaR documentation built on Jan. 25, 2025, 8:54 a.m.