unlimithealth_colours: Custom Unlimit Health branded scale colour/fill function for...

unlimithealth_coloursR Documentation

Custom Unlimit Health branded scale colour/fill function for ggplot2.

Description

Colours are assigned according to the order in the palette. If variable has more levels than specified in palette, colourRamp to generate additional colours matching the palette. The skip argument is optional but useful where some IUs are not treated

Usage

uh_cols(...)

uh_palettes

uh_pal(palette = "all", reverse = FALSE, skip, ...)

scale_color_uh(palette = "all", discrete = TRUE, reverse = FALSE, skip, ...)

scale_colour_uh(palette = "all", discrete = TRUE, reverse = FALSE, skip, ...)

scale_fill_uh(palette = "all", discrete = TRUE, reverse = FALSE, skip, ...)

Arguments

...

Other arguments passed on to ggplot2 scale function to control limits, breaks and labels etc.

palette

A palette name from one of:

  • all - all Unlimit Health branded colours

  • main - the primary and secondary Unlimit Health colours (7)

  • primary - the 3 primary Unlimit Health colours

  • secondary - the 4 secondary Unlimit Health colours

  • complementary - the 4 highlight colours that are to complement & contrast the secondary palette, though similar in colours.

  • yesno - contrasting dark blue and neutral from the primary palette

  • gender - contrasting red earth and deep aqua from the secondary palette

reverse

Reserve the direction of the palette? Default is FALSE.

skip

A numeric vector. Index/Indices of colours in the palette to be skipped over.

discrete

Default is TRUE. FALSE if a continuous colour gradient is required.

Format

An object of class list of length 7.

Examples

uh_pal(palette= "primary")(2)
 scale_colour_uh(palette="main",skip = 3) skip is specified and the 3rd colour in the main palette will be skipped


SCIFoundation/sciCoverageR documentation built on Oct. 31, 2024, 11:45 p.m.