Learn R Programming

ggthemes (version 2.1.0)

geom_tufteboxplot: Tufte's Box Blot

Description

Edward Tufte's revision of the box plot erases the box and replaces it with a single point and the whiskers.

Usage

geom_tufteboxplot(mapping = NULL, data = NULL, stat = "boxplot",
  position = "dodge", outlier.colour = "black", outlier.shape = 16,
  outlier.size = 2, fatten = 4, median.type = "point", boxwidth = 0.25,
  ...)

Arguments

mapping
The aesthetic mapping, usually constructed with aes or aes_string. Only needs to be set at the layer level if you are overriding the plot defaults.
data
A layer specific dataset - only needed if you want to override the plot defaults.
stat
The statistical transformation to use on the data for this layer.
position
The position adjustment to use for overlapping points on this layer
outlier.colour
colour for outlying points
outlier.shape
shape of outlying points
outlier.size
size of outlying points
fatten
a multiplicative factor to fatten the middle point (or line) by
median.type
One of "box", "line", or "box". If median.type="point", then use whitespace to represent the central quartiles and a point at the median. If median.type="box", then use a box to represent th
boxwidth
a number between 0 and 1 which represents the relative width of the box to the middle line.
...
other arguments passed on to layer. This can include aesthetics whose values you want to set, not map. See layer for more details.

Aesthetics

[results=rd,stage=build]{ggthemes:::rd_aesthetics("geom_tufteboxplot", ggthemes:::GeomTufteboxplot)} p <- ggplot(mtcars, aes(factor(cyl), mpg)) ## with only a point p + geom_tufteboxplot() ## with a middle box p + geom_tufteboxplot(median.type="box", fatten=1) ## using lines p + geom_tufteboxplot(median.type="line") Tufte, Edward R. (2001) The Visual Display of Quantitative Information, Chapter 6.

McGill, R., Tukey, J. W. and Larsen, W. A. (1978) Variations of box plots. The American Statistician 32, 12-16.

geom_boxplot

Other geom tufte: geom_rangeframe