Learn R Programming

colouR (version 0.1.1)

scaleFill: scaleFill

Description

Create a Custom Fill Scale for ggplot2. This function creates a custom fill scale for ggplot2 plots based on the specified 'palette' name. The color palettes are sourced from two predefined lists: 'taylor_palettes' and 'radiohead_palettes'. The function can create either a discrete or continuous fill scale, depending on the 'discrete' parameter. Additional arguments passed to the function are forwarded to the corresponding ggplot2 scale function.

Usage

scaleFill(palette, discrete = TRUE, ...)

Value

A ggplot2 fill scale based on the specified color palette.

Arguments

palette

A character string specifying the name of the color palette. The palette must be present in either 'taylor_palettes' or 'radiohead_palettes'.

discrete

A logical value indicating whether to create a discrete (TRUE) or continuous (FALSE) fill scale. Default is TRUE.

...

Additional arguments to be passed to the ggplot2 scale function.