Description Usage Arguments References Examples
Theme based on Chapter 6 'Data-Ink Maximization and Graphical
Design' of Tufte The Visual Display of Quantitative Information.
No border, no axis lines, no grids. This theme works
well in combination with geom_rug
or
geom_rangeframe
.
1 | theme_tufte(base_size = 11, ticks = TRUE, sans_title = FALSE)
|
base_size |
base font size |
ticks |
|
sans_title |
If |
Tufte, Edward R. (2001) The Visual Display of Quantitative Information, Chapter 6.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library("ggplot2")
library("extrafont")
extrafont::loadfonts(quiet = TRUE)
extrafont::loadfonts("postscript", quiet = TRUE)
p <- ggplot(mtcars, aes(x = wt, y = mpg)) +
geom_point() +
scale_x_continuous(breaks = pretty_range_breaks(mtcars$wt, 5)) +
scale_y_continuous(breaks = pretty_range_breaks(mtcars$mpg, 5)) +
ggtitle("Cars")
p + geom_rangeframe() +
theme_tufte()
p + geom_rug() +
theme_tufte(ticks = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.