A combination of
geom_lineribbon() with sensible defaults.
geom_lineribbon is intended for use on data frames that have already been summarized using
stat_lineribbon is intended for use directly on data
frames of draws, and will perform the summarization using a
stat_dist_lineribbon is intended for use on analytical distributions through the
stat_lineribbon( mapping = NULL, data = NULL, geom = "lineribbon", position = "identity", ..., interval_function = NULL, interval_args = list(), point_interval = median_qi, .width = c(0.5, 0.8, 0.95), na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, .prob, fun.data, fun.args ) stat_dist_lineribbon( mapping = NULL, data = NULL, geom = "lineribbon", position = "identity", ..., n = 501, .width = c(0.5, 0.8, 0.95), na.rm = FALSE, show.legend = NA, inherit.aes = TRUE )
Set of aesthetic mappings created by
The data to be displayed in this layer. There are three options:
Use to override the default connection between
Position adjustment, either as a string, or the result of a call to a position adjustment function.
Custom function for generating intervals (for most common use cases the
Additional arguments passed to
A function from the
Should this layer be included in the legends?
Number of points at which to evaluate
geom_lineribbon() for the geom version, intended for use on points and intervals that have
already been summarized using a
point_interval() function. See
for a similar stat intended for point summaries and intervals.
library(dplyr) library(ggplot2) library(distributional) tibble(x = 1:10) %>% group_by_all() %>% do(tibble(y = rnorm(100, .$x))) %>% ggplot(aes(x = x, y = y)) + stat_lineribbon() + scale_fill_brewer()tibble( x = 1:10, sd = seq(1, 3, length.out = 10) ) %>% ggplot(aes(x = x, dist = dist_normal(x, sd))) + stat_dist_lineribbon() + scale_fill_brewer()