Scatterplot template for plots of inferred data trends versus forecast differences and related plots.
Source:R/plot_trend_versus_diff.R
plot_trend_versus_diff.Rd
Scatterplot template for plots of inferred data trends versus forecast differences and related plots.
Usage
plot_trend_versus_diff(
data,
x_metric,
y_metric,
fill_metric = NULL,
x_transform = "identity",
y_transform = "identity",
x_center = NULL,
...
)
Arguments
- data
Dataframe to plot, as the output of
ggdist::mean_qi()
or a related function.- x_metric
Column to map to the x axis.
- y_metric
Column to map to the y axis.
- fill_metric
Column to map to the fill aesthetic. If
NULL
, do not map the fill aesthetic.- x_transform
Transformation for the x axis scale. Default
"identity"
.- y_transform
Transformation for the y axis scale. Default
"identity"
.- x_center
Center point for the symmetric x axis limits. Default
NULL
.- ...
keyword arguments passed to
ggplot2::geom_point()
.
Value
The plot as a ggplot2::ggplot()
object.