
Custom PACTA technology colour and fill scales
Source:R/scale_colour_r2dii_tech.R
scale_colour_r2dii_tech.RdA custom discrete colour and fill scales with colours from the PACTA technology palette.
Usage
scale_colour_r2dii_tech(sector, technologies = NULL, ...)
scale_fill_r2dii_tech(sector, technologies = NULL, ...)Arguments
- sector
A string. Sector name specifying a colour palette. Run
unique(r2dii.plot:::technology_colours$sector)to see available sectors.- technologies
A character vector. Specifies technologies to use as colours and their order. Run
unique(r2dii.plot:::technology_colours$technology)to see available technologies (pay attention if they match thesector). Similar tovalueparameter inggplot2::scale_colour_manual().- ...
Other parameters passed on to
ggplot2::discrete_scale().
See also
Other r2dii scales:
scale_colour_r2dii(),
scale_colour_r2dii_sector()
Examples
library(ggplot2, warn.conflicts = FALSE)
ggplot(mpg) +
geom_point(aes(displ, hwy, color = class)) +
scale_colour_r2dii_tech("automotive")
ggplot(mpg) +
geom_histogram(aes(cyl, fill = class), position = "dodge", bins = 5) +
scale_fill_r2dii_tech("automotive")