Examples for 'ggthemes::geom_tufteboxplot'


Tufte's Box Plot

Aliases: geom_tufteboxplot GeomTufteboxplot

Keywords: datasets

### ** Examples

library("ggplot2")

p <- ggplot(mtcars, aes(factor(cyl), mpg))
# with a point for the median and lines for whiskers
p + geom_tufteboxplot()
plot of chunk example-ggthemes-geom_tufteboxplot-1
# with a line for the interquartile range and points for whiskers
p + geom_tufteboxplot(median.type = "line", whisker.type = "point", hoffset = 0)
plot of chunk example-ggthemes-geom_tufteboxplot-1
# with a wide line for the interquartile range and lines for whiskers
p + geom_tufteboxplot(median.type = "line", hoffset = 0, width = 3)
Warning: position_dodge requires non-overlapping x intervals
plot of chunk example-ggthemes-geom_tufteboxplot-1
# with an offset line for the interquartile range and lines for whiskers
p + geom_tufteboxplot(median.type = "line")
plot of chunk example-ggthemes-geom_tufteboxplot-1
# combined with theme_tufte
p + geom_tufteboxplot() +
  theme_tufte() +
  theme(axis.ticks.x = element_blank())
plot of chunk example-ggthemes-geom_tufteboxplot-1

[Package ggthemes version 4.2.4 Index]