Skip to contents

Creates a visualization of state and point events from an anicore::anievent() using geom_event_state() and geom_event_point(). Returns a patchwork object that can be combined with additional plots. The drawing itself is done by plot_events().

Usage

# S3 method for class 'anievent'
plot(x, ..., mode = c("light", "dark"))

Arguments

x

An anievent object.

...

Additional arguments passed to underlying plot functions.

mode

Either "light" (default) or "dark"; passed to theme_animovement().

Value

A patchwork object.

See also

Examples

events <- anicore::anievent(
  individual = 1L,
  channel = c("behaviour", "behaviour", "call"),
  label = c("REM", "wake", "alarm"),
  start = c(3, 14, 4.5),
  stop = c(9, 19, 4.5)
)
plot(events)