Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
201 lines (114 sloc) 4.27 KB


Some extra themes and scales for ggplot,


  • Tufte range frame
  • Tufte box plot



  • Solarized colors
  • The Economist colors.
  • Stata colors, shapes, and linetypes
  • Excel colors (old and new)
  • Tableau colors and shapes
  • Shape scales from William S. Cleveland's Elements of Graphing Data, Tremmel (1995), and Lewandowsky and Spence (1989).
  • Color scale based on Stephen Few's "Practical Rules for Using Color in Charts".


It is probably easiest to use the devtools package to install the latest version:

install_github("ggplotJrnold", "jrnold")


dsamp <- diamonds[sample(nrow(diamonds), 1000), ]

Tufte theme and geoms

Minimal theme and geoms based on plots in The Visual Display of Quantitative Information.

(ggplot(mtcars, aes(wt, mpg)) + geom_point() + geom_rangeframe() + 

plot of chunk unnamed-chunk-3

The Tufte minimal boxplot.

(ggplot(mtcars, aes(factor(cyl), mpg)) + theme_tufte(ticks = FALSE) + 

plot of chunk unnamed-chunk-4

Economist theme

A theme that approximates the style of plots in The Economist magazine.

(qplot(carat, price, data = dsamp, colour = cut) + theme_economist() + 
    scale_colour_economist() + ggtitle("Diamonds Are Forever"))

plot of chunk unnamed-chunk-5

Solarized theme

A theme and color and fill scales based on the Solarized palette.

The light theme.

(qplot(carat, price, data = dsamp, colour = cut) + theme_solarized() + 

plot of chunk unnamed-chunk-6

The dark theme.

(qplot(carat, price, data = dsamp, colour = cut) + theme_solarized(light = FALSE) + 

plot of chunk unnamed-chunk-7

Stata theme

Themes and scales (color, fill, linetype, shapes) based on the graph schemes in Stata.

(qplot(carat, price, data = dsamp, colour = cut) + theme_stata() + 
    scale_colour_stata() + ggtitle("Plot Title"))

plot of chunk unnamed-chunk-8

Excel 2003 theme

For that classic ugly look and feel. For ironic purposes only. 3D bars and pies not included. Please never use this theme.

(qplot(carat, price, data = dsamp, colour = cut) + theme_excel2003() + 

plot of chunk unnamed-chunk-9

(ggplot(diamonds, aes(clarity, fill = cut)) + geom_bar() + scale_fill_excel2003() + 

plot of chunk unnamed-chunk-10

Inverse Gray Theme

Inverse of theme_gray, i.e. white plot area and gray background.

(qplot(carat, price, data = dsamp, colour = cut) + theme_igray())

plot of chunk unnamed-chunk-11

Tableau Scales

Color, fill, and shape scales based on those used in the Tableau softare.

(qplot(carat, price, data = dsamp, colour = cut) + theme_igray() + 

plot of chunk unnamed-chunk-12

(qplot(carat, price, data = dsamp, colour = cut) + theme_igray() + 

plot of chunk unnamed-chunk-13

Stephen Few's Practical Rules for Using Color ...

Color palette and theme based on Stephen Few's "Practical Rules for Using Color in Charts".

(qplot(carat, price, data = dsamp, colour = cut) + theme_few() + 

plot of chunk unnamed-chunk-14

Something went wrong with that request. Please try again.