stat_vase: Combination of boxplot and 1d kernel density estimate along y...

Description Usage Arguments Value See Also Examples

Description

Combination of boxplot and 1d kernel density estimate along y axis, for vase plot.

Usage

1
2
3
stat_vase(mapping = NULL, data = NULL, geom = "vase",
  position = "dodge", adjust = 1, kernel = "gaussian", scale = "area",
  show.legend = NA, inherit.aes = TRUE, width = 0.9, ...)

Arguments

mapping

Set of aesthetic mappings created by aes or aes_. If specified and inherit.aes = TRUE (the default), is combined with the default mapping at the top level of the plot. You only need to supply mapping if there isn't a mapping defined for the plot.

data

A data frame. If specified, overrides the default data frame defined at the top level of the plot.

geom

Use to override the default connection between geom_density and stat_density.

position

Position adjustment, either as a string, or the result of a call to a position adjustment function.

adjust

see density for details

kernel

kernel used for density estimation, see density for details

scale

if "area" (default), all vases have the same area (before trimming the tails). If "count", areas are scaled proportionally to the number of observations. If "width", all vases have the same maximum width.

show.legend

logical. Should this layer be included in the legends? NA, the default, includes if any aesthetics are mapped. FALSE never includes, and TRUE always includes.

inherit.aes

If FALSE, overrides the default aesthetics, rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. borders.

...

other arguments passed on to layer. There are three types of arguments you can use here:

  • Aesthetics: to set an aesthetic to a fixed value, like color = "red" or size = 3.

  • Other arguments to the layer, for example you override the default stat associated with the layer.

  • Other arguments passed on to the stat.

na.rm

If FALSE (the default), removes missing values with a warning. If TRUE silently removes missing values.

Value

A data frame with additional columns:

density

density estimate

scaled

density estimate, scaled to maximum of 1

count

density * number of points - not sure about usefulness for vase plots

vasewidth

density scaled for the vase plot, according to area, counts or to a constant maximum width

n

number of points

width

width of vase bounding box

See Also

geom_vase for examples, and geom_violin for examples with data along the x axis.

Examples

1
2
# See geom_vase for examples
# Also see stat_density for similar examples with data along x axis

heike/ggboxplots documentation built on May 17, 2019, 3:23 p.m.