Skip to contents

Plot a scatterplot of scores comparing those of one model to those of another, for a given stratification.

Usage

plot_score_scatter(
  scores,
  metric,
  model_x,
  model_y,
  by = NULL,
  label = NULL,
  nudge_x = 0,
  nudge_y = 0,
  label_size = 2,
  label_color = "black",
  ...
)

Arguments

scores

Table of unsummarized scores, as the output of [scoringutils::score().

metric

Metric to plot.

model_x

Model whose score should be plotted on the x axis.

model_y

Model whose score should be plotted on the y axis.

by

Summize scores by these columns. Passed as the by argument to forecasttools::summarise_scores_with_baseline(). Default NULL.

label

Column to use for labeling points. If NA or NULL, do not label.

nudge_x

Passed to geom_text(). Default 0.

nudge_y

Passed to geom_text(). Default 0.

label_size

Passed as the "size" argument to geom_text(). Default 2.

label_color

Passed as the "color" argument to geom_text(). Default "black".

...

Keyword arguments passed to ggplot2::geom_point().

Value

The scatterplot, as ggplot object