Scatterplot of inferred data trends versus forecast differences.
Source:R/plot_trend_versus_diff.R
plot_trend_versus_diff.Rd
Scatterplot of inferred data trends versus forecast differences.
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
Name of the column containing the point estimate of the metric to plot on the x axis (typically a trend).
- y_metric
Name of the column containing the point estimate of the metric to plot on the y axis (typically a measure of forecast difference.
- fill_metric
Name of the column to associate 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.