/ggthemes

ggplot themes and scales

Primary LanguageR

Build Status rstudio mirror downloads cran version

ggthemes

Overview

Some extra geoms, scales, and themes for ggplot, including:

Geoms

  • geom_rangeframe : Tufte's range frame
  • geom_tufteboxplot: Tufte's box plot

Themes

  • theme_calc: a theme based on LibreOffice Calc.
  • theme_economist: a theme based on the plots in the The Economist magazine.
  • theme_excel: a theme replicating the classic ugly gray charts in Excel
  • theme_few: theme from Stephen Few's "Practical Rules for Using Color in Charts".
  • theme_fivethirtyeight: a theme based on the plots at fivethirtyeight.com.
  • theme_gdocs: a theme based on Google Docs.
  • theme_hc: a theme based on Highcharts JS.
  • theme_pander: a theme to use with the pander package.
  • theme_solarized: a theme using the solarized color palette.
  • theme_stata: themes based on Stata graph schemes.
  • theme_tufte: a minimal ink theme based on Tufte's The Visual Display of Quantitative Information.
  • theme_wsj: a theme based on the plots in the The Economist magazine.

Scales

  • scale_colour_calc, scale_shape_calc: color and shape palettes from LibreOffice Calc.
  • scale_colour_colorblind: Colorblind safe palette from http://jfly.iam.u-tokyo.ac.jp/color/.
  • scale_colour_economist: colors used in plots in plots in The Economist.
  • scale_colour_excel: colors from new and old Excel.
  • scale_colour_few: color palettes from Stephen Few's "Practical Rules for Using Color in Charts".
  • scale_colour_gdocs: color palette from Google Docs.
  • scale_colour_hc: a theme based on Highcharts JS.
  • scale_colour_solarized: Solarized colors
  • scale_colour_stata, scale_shapes_stata, scale_linetype_stata: color, shape, and linetype palettes from Stata graph schemes.
  • scale_colour_tableau, scale_shape_tableau: color and shape palettes from Tableau.
  • scale_colour_pander, scale_fill_pander: scales to use with the pander package.
  • scale_shape_cleveland, scale_shape_tremmel, scale_shape_circlefill: shape scales from classic works in visual perception: Cleveland, Tremmel (1995), and Lewandowsky and Spence (1989).
  • scale_x_tufte, scale_y_tufte: x and y scales with pretty labels that also include the min and max values.

Most of these scales also have associates palettes, as used in the scales package.

Miscellaneous

  • bank_slopes: Find the optimal aspect ratio to bank slopes to 45 degrees

Install

To install the stable version from CRAN,

install.packages('ggthemes', dependencies = TRUE)

Or, to install the development version from github, use the devtools package,

library("devtools")
install_github("jrnold/ggthemes")

Windows users also must first install Rtools.

Contribute

Contributions are welcome! If you would like to add a theme, scales, etc., fork the repository, add your theme, and submit a pull request.