Last data update: 2014.03.03

R: Color Palettes for Publication (discrete)
pub_color_palR Documentation

Color Palettes for Publication (discrete)

Description

Color palettes for publication-quality graphs. See details.

Usage

pub_color_pal(palette = "pub12")

Arguments

palette

the palette name, a character string.

Details

The following palettes are available:

  • "pub12"A 12-color colorblind safe qualitative discrete palette.

  • "gray5"5-tons of gray.

  • "carnival"A 5-color palette inspired in the Brazilian samba schools.

  • "tableau20"Based on software Tableau

  • "tableau10"Based on software Tableau

  • "tableau10light"Based on software Tableau

  • "tableau10medium"Based on software Tableau

  • "fte"fivethirtyeight.com color scales

Examples

library(scales)
library(ggplot2)

show_col(pub_color_pal("pub12")(12))
show_col(pub_color_pal("gray5")(6), labels = FALSE)
show_col(pub_color_pal("chalk")(8))
show_col(pub_color_pal("carnival")(4))
show_col(pub_color_pal("gdocs")(18))
show_col(pub_color_pal("tableau20")(20))
show_col(pub_color_pal("tableau10")(10))
show_col(pub_color_pal("tableau10medium")(10))
show_col(pub_color_pal("tableau10light")(10))
show_col(pub_color_pal("cyclic")(20))
show_col(pub_color_pal("bivariate1")(9))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(SciencesPo)
Loading required package: ggplot2
initializing ... done

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/SciencesPo/pub_color_pal.Rd_%03d_medium.png", width=480, height=480)
> ### Name: pub_color_pal
> ### Title: Color Palettes for Publication (discrete)
> ### Aliases: pub_color_pal
> 
> ### ** Examples
> 
> library(scales)
> library(ggplot2)
> 
> show_col(pub_color_pal("pub12")(12))
> show_col(pub_color_pal("gray5")(6), labels = FALSE)
> show_col(pub_color_pal("chalk")(8))
> show_col(pub_color_pal("carnival")(4))
> show_col(pub_color_pal("gdocs")(18))
> show_col(pub_color_pal("tableau20")(20))
> show_col(pub_color_pal("tableau10")(10))
> show_col(pub_color_pal("tableau10medium")(10))
> show_col(pub_color_pal("tableau10light")(10))
> show_col(pub_color_pal("cyclic")(20))
> show_col(pub_color_pal("bivariate1")(9))
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>