dem_palette: Demographics palette

Description Usage Format Examples

Description

Palette which can be used as values argument to ggplot2::scale_color_manual or ggplot2::scale_fill_manual, and includes common GBD comparators and output types.

Usage

1

Format

A named list, where the names are:

And the values are hex codes for colors to use for these data types.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(ggplot2)
ggplot(data = data.frame(x = names(dem_palette)),
       aes(y = 1, fill = x)) +
       geom_bar() +
       theme_minimal() +
       scale_fill_manual(values = dem_palette) +
       facet_grid(. ~ x) +
       labs(y = "", fill = "", x = "") +
       theme(axis.text.y = element_blank(),
             axis.text.x = element_blank(),
             legend.position = "none")

ihmeuw-demographics/demViz documentation built on Feb. 6, 2021, 11:10 p.m.