scale_colour_r2dii_sector: Custom 2DII sector colour and fill scales

View source: R/scale_colour_r2dii_sector.R

scale_colour_r2dii_sectorR Documentation

Custom 2DII sector colour and fill scales

Description

A custom discrete colour and fill scales with colours from 2DII sector palette.

Usage

scale_colour_r2dii_sector(sectors = NULL, ...)

scale_fill_r2dii_sector(sectors = NULL, ...)

Arguments

sectors

A character vector. Specifies sector colours to use and their order. Run unique(r2dii.plot:::sector_colours$label) to see available labels. Similar to value parameter in ggplot2::scale_colour_manual().

...

Other parameters passed on to ggplot2::discrete_scale().

Value

An object of class "ScaleDiscrete".

See Also

Other r2dii scales: scale_colour_r2dii(), scale_colour_r2dii_tech()

Examples

library(ggplot2, warn.conflicts = FALSE)

ggplot(mpg) +
  geom_point(aes(displ, hwy, color = class)) +
  scale_colour_r2dii_sector()

ggplot(mpg) +
  geom_histogram(aes(cyl, fill = class), position = "dodge", bins = 5) +
  scale_fill_r2dii_sector()

r2dii.plot documentation built on April 3, 2025, 9:22 p.m.