Add a density figure to the chart.
fig_density( g, ..., sync = TRUE, data = NULL, inherit_asp = TRUE, alias = "density" )
| g | An object of class |
|---|---|
| ... | Options to pass to the figure, including |
| sync | Whether to sync the axis data (align) with that
used in other figures, set to |
| data | A dataset ( |
| inherit_asp | Whether to inherit the aspects paseed to
|
| alias | Name of the density curve. |
Requires the x aspects.
g2(cars, asp(speed)) %>% fig_density() g2(iris, asp(Sepal.Width, color = Species)) %>% fig_density()