make_plot: Make a ggplot from a BehaviorSpace experiment

View source: R/abs_plot.R

make_plotR Documentation

Make a ggplot from a BehaviorSpace experiment

Description

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.

Usage

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.


jonathan-g/analyzeBehaviorspace documentation built on July 23, 2022, 11:01 a.m.