Description Usage Arguments References See Also Examples
View source: R/geom-quartileplot.R
Tufte The Visual Display of Quantitative Information (Ch 6) proposes several revisions of the box plot. These variants compactly display the distribution of a continuous variable. It visualises five summary statistics: the median, two hinges (25% and 75% quartiles) and two whiskers (minimum, maximum).
1 2 3 4 |
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
stat |
The statistical transformation to use on the data for this layer, as a string. |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
... |
Other arguments passed on to |
Tufte, Edward R. (2001) The Visual Display of Quantitative Information, Chapter 6.
geom_boxplot
and geom_pointrange
.
Other geom tufte: geom_rangeframe
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | library("ggplot2")
library("extrafont")
extrafont::loadfonts(quiet = TRUE)
extrafont::loadfonts("postscript", quiet = TRUE)
p <- ggplot(mtcars, aes(factor(cyl), mpg))
# with a point for the median and lines for whiskers
p + geom_quartileplot()
# with a line for the interquartile range and points for whiskers
p + geom_quartileplot(middle.line = TRUE, whisker.line = FALSE)
# with a wide line for the interquartile range and lines for whiskers
p + geom_quartileplot(middle.line = TRUE, hoffset = 0, fatten = 2)
# with an offset line for the interquartile range and lines for whiskers
p + geom_quartileplot(middle.line = TRUE, hoffset = 0.01, fatten = 1)
# combined with theme_tufte
p + geom_quartileplot() +
theme_tufte() +
theme(axis.ticks.x = element_blank())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.