geom_navr_path_events: Plots positions of given events on a path

View source: R/navr-plot-elements.R

geom_navr_path_eventsR Documentation

Plots positions of given events on a path

Description

PLots marks or colors the path ior the duration of a certain event.

Usage

geom_navr_path_events(
  obj,
  event_times,
  size = 2,
  shape = 18,
  color = "blue",
  ...
)

Arguments

obj

navr object

event_times

matrix of event times. It can have one or two dimensions, if single events or events with a duration are to be plotted

  • one dimension: Each number represents a time in which an event occured. See geom_navr_path_points

  • two dimentsions: Each column of the matrix marks the begining and an end of the event. First row is the beginings and second is the ends. Path between the beginning and end is then colored. See geom_navr_path_segments Times need to be on the same scale as the timestamps in obj$data$timestamp

size

point or path size. Defaults to 2

shape

point shape. Only relevant if single events are drawn. Default* to 4

color

point or path color Default to "blue"

...

Details

Searches the timestamps for the closes time (more then event time)

Value

list of ggplot geoms


hejtmy/navr documentation built on March 3, 2023, 5:24 p.m.