Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

theme_tufte

Tufte Maximal Data, Minimal Ink Theme


Description

Theme based on Chapter 6 'Data-Ink Maximization and Graphical Design' of Edward Tufte *The Visual Display of Quantitative Information*. No border, no axis lines, no grids. This theme works best in combination with geom_rug() or geom_rangeframe().

Usage

theme_tufte(base_size = 11, base_family = "serif", ticks = TRUE)

Arguments

base_size

base font size, given in pts.

base_family

base font family

ticks

logical Show axis ticks?

Note

The default font family is set to 'serif' as he uses serif fonts for labels in 'The Visual Display of Quantitative Information'. The serif font used by Tufte in his books is a variant of Bembo, while the sans serif font is Gill Sans. If these fonts are installed on your system, then you can use them with the package extrafont.

References

Tufte, Edward R. (2001) The Visual Display of Quantitative Information, Chapter 6.

Examples

library("ggplot2")

p <- ggplot(mtcars, aes(x = wt, y = mpg)) +
  geom_point() +
  scale_x_continuous(breaks = extended_range_breaks()(mtcars$wt)) +
  scale_y_continuous(breaks = extended_range_breaks()(mtcars$mpg)) +
  ggtitle("Cars")

p + geom_rangeframe() +
  coord_cartesian(clip="off") +
  theme_tufte()

p + geom_rug() +
 theme_tufte(ticks = FALSE)

ggthemes

Extra Themes, Scales and Geoms for 'ggplot2'

v4.2.4
GPL-2
Authors
Jeffrey B. Arnold [aut, cre] (<https://orcid.org/0000-0001-9953-3904>), Gergely Daroczi [ctb], Bo Werth [ctb], Brian Weitzner [ctb], Joshua Kunst [ctb], Baptise Auguie [ctb], Bob Rudis [ctb], Hadley Wickham [ctb] (Code from the ggplot2 package.), Justin Talbot [ctb] (Code from the labeling package), Joshua London [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.