Skip to contents

This function is used when both evaluated metrics are vector-valued, so a curve is plotted, parametrized by the two metrics. To plot a single metric that is vector-valued, pass NULL for metric_name_x. This behaves similarly to plot(runif(5)), in which the x-axis variable is simply 1:5. If evals is a listofEvals, then each model will be its own plot.

Usage

plot_evals(
  object,
  metric_name_x,
  metric_name_y,
  use_ggplot2 = TRUE,
  main,
  facet_mains,
  xlab,
  ylab,
  xlim,
  ylim,
  include_zero = FALSE,
  legend_location = "topright",
  method_col = seq(num_methods),
  method_lty = rep(1, num_methods),
  method_lwd = rep(1, num_methods),
  method_pch = rep(NA, num_methods),
  ...
)

Arguments

object

an object of class Simulation, Evals, or listofEvals

metric_name_x

the name of metric to plot on x axis (or NULL)

metric_name_y

the name of metric to plot on y axis

use_ggplot2

whether to use ggplot2 (requires installation of ggplot2)

main

title of plot. Default is model_label when evals is a single Evals.

facet_mains

only to be used when evals is a listofEvals and should be of the same length. Default will be the model_label for each model.

xlab

the x-axis label (default is metric_label_x)

ylab

the y-axis label (default is metric_label_y)

xlim

the limits of the x-axis

ylim

the limits of the y-axis

include_zero

whether ylim should include 0. Ignored if ylim is passed explicitly

legend_location

location of legend. Set to NULL to remove legend.

method_col

color to use for each method

method_lty

line style to use for each method

method_lwd

line thickness to use for each method

method_pch

point style to use for each method (default is that no points, only lines are drawn)

...

additional arguments to pass to boxplot (only when use_ggplot2 = FALSE).