plot.behavior_stream: Plot method for 'behavior_stream' objects

View source: R/plot_methods.R

plot.behavior_streamR Documentation

Plot method for behavior_stream objects

Description

Creates a graphical representation of a set of simulated behavior streams.

Usage

## S3 method for class 'behavior_stream'
plot(
  x,
  session_color = "black",
  episode_color = "blue",
  episode_thickness = 2,
  ...
)

Arguments

x

object of class behavior_stream

session_color

character string indicating the color of the lines that represent session time. Default is black.

episode_color

character string indicating the color of the bars that represent episode durations. Default is blue.

episode_thickness

numeric value indicating the thickness of the bars that represent episode durations. Default is 2.

...

Further arguments, not used for this method.

Details

The plot is created using ggplot from the ggplot2 package, which must be installed.

Value

An object of class ggplot.

Examples


if (requireNamespace("ggplot2", quietly = TRUE)) {
b_streams <- r_behavior_stream(n = 5, mu = 3, lambda = 10, 
                               F_event = F_exp(), F_interim = F_exp(), 
                               stream_length = 100)
plot(b_streams)
}


ARPobservation documentation built on Aug. 25, 2023, 5:19 p.m.