View source: R/colour_nhsbsa.R
scale_fill_nhsbsa | R Documentation |
Scale fill an NHSBSA ggplot using the NHSBSA colour palette.
scale_fill_nhsbsa(palette = NA, n_discrete = 0, reverse = FALSE, ...)
palette |
String type of colour palette. Default is NA, otherwise
should be one one |
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 |
colour palette
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.