Make a ggplot plot from a BehaviorSpace experiment, using a chosen x-variable, y-variable, and optional grouping variable. In addition, the user may specify error bars for the plot, and may choose to plot all ticks, or only the last tick of each run.

make_plot(
  experiment,
  points,
  lines,
  x_var,
  y_var,
  group_var,
  error_bars = "none",
  last_tick = FALSE
)

Arguments

experiment

A BehaviorSpace experiment object, as returned from load_bs_file(), load_bs_table(), or load_bs_spreadsheet().

points

Logical: plot points.

lines

Logical: plot lines.

x_var

The name of the x-variable.

y_var

The name of the y-variable.

group_var

Optionally, the name of a grouping variable.

error_bars

The kind of error bars to use. Legal values are "none", "error bars", or "bands"

last_tick

Logical: Plot only the last tick from each run.

Value

A ggplot object.