R/scale_fill_prism.R

Defines functions scale_fill_prism

Documented in scale_fill_prism

#' Prism fill scales (discrete)
#'
#' A collection of discrete fill scales that use palettes which mirror the
#' colour schemes available in GraphPad Prism.
#'
#' @param palette `string`. Palette name, see
#' `lengths(ggprism_data$fill_palettes)`
#' for valid palette names.
#' @inheritDotParams ggplot2::discrete_scale -aesthetics -scale_name
#'
#' @return Returns a ggproto object of class _ScaleDiscrete_ which works with
#' _fill_ aesthetics.
#'
#' @example inst/examples/ex-scale_fill_prism.R
#'
#' @export
scale_fill_prism <- function(palette = "colors", ...) {
  discrete_scale("fill", "prism", prism_fill_pal(palette = palette), ...)
}

Try the ggprism package in your browser

Any scripts or data that you put into this service are public.

ggprism documentation built on May 29, 2024, 5:59 a.m.