Some extra themes and scales for ggplot,
- Tufte range frame
- Tufte box plot
- Tufte minimal ink theme
- Solarized
- Stata themes
- The Economist
- Excel (the ugly gray background one)
- 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:
library("devtools")
install_github("ggplotJrnold", "jrnold")
library("ggplot2")
library("ggplotJrnold")
dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
Minimal theme and geoms based on plots in The Visual Display of Quantitative Information.
(ggplot(mtcars, aes(wt, mpg)) + geom_point() + geom_rangeframe() +
theme_tufte())
The Tufte minimal boxplot.
(ggplot(mtcars, aes(factor(cyl), mpg)) + theme_tufte(ticks = FALSE) +
geom_tufteboxplot())
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"))
A theme and color and fill scales based on the Solarized palette.
The light theme.
(qplot(carat, price, data = dsamp, colour = cut) + theme_solarized() +
scale_colour_solarized("blue"))
The dark theme.
(qplot(carat, price, data = dsamp, colour = cut) + theme_solarized(light = FALSE) +
scale_colour_solarized("red"))
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"))
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() +
scale_colour_excel2003())
(ggplot(diamonds, aes(clarity, fill = cut)) + geom_bar() + scale_fill_excel2003() +
theme_excel2003())
Inverse of theme_gray
, i.e. white plot area and gray background.
(qplot(carat, price, data = dsamp, colour = cut) + theme_igray())
Color, fill, and shape scales based on those used in the Tableau softare.
(qplot(carat, price, data = dsamp, colour = cut) + theme_igray() +
scale_colour_tableau())
(qplot(carat, price, data = dsamp, colour = cut) + theme_igray() +
scale_colour_tableau("colorblind10"))
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() +
scale_colour_few())