scale_fill_nhsbsa: Scale fill an NHSBSA ggplot using the NHSBSA colour palette.

View source: R/colour_nhsbsa.R

scale_fill_nhsbsaR Documentation

Scale fill an NHSBSA ggplot using the NHSBSA colour palette.

Description

Scale fill an NHSBSA ggplot using the NHSBSA colour palette.

Usage

scale_fill_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_bar(mapping = ggplot2::aes(x = cut, fill = cut)) +
  nhsbsaR::scale_fill_nhsbsa()
ggplot2::ggplot(data = ggplot2::diamonds) +
  ggplot2::geom_bar(mapping = ggplot2::aes(x = cut, fill = cut)) +
  nhsbsaR::scale_fill_nhsbsa(palette = "gradient", n_discrete = 5)

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