Skip to contents

Palettes

Getting colours out of a palette, and finding out what is available.

energypal()
Energy colour palette
energypal_info()
Available energy palettes
energypal_show()
Plot energy palettes
energypal_table()
Flatten a palette into a table

Matching data labels

Resolving the source labels real datasets use onto palette entries.

energypal_colors() energypal_colours()
Colours for a vector of data labels
energypal_match()
Match data labels to palette entries

Ordering

Sequencing legends and chart series. Presentation only - orderings are not model inputs.

energypal_orders()
Orderings available for a palette

ggplot2 scales

Shades

Distinguishing several series that resolve to the same carrier.

energypal_gradient()
Shades of a single colour

Your own palettes

A named colour vector is a palette; save it, edit the YAML, load it back.

energypal_create()
Build a palette from a named colour vector
energypal_write()
Write a palette to a YAML file
energypal_register()
Register a user palette for this session
energypal_spec()
Load a palette specification
energypal_validate()
Validate a palette specification
energypal_validate_families()
Check the family structure of the built-in palettes

Data

owid_energy_mix
OWID Electricity Generation Mix (Curated Subset)