plot.dsdive: Plotting functions for completely observed dive trajectories

Description Usage Arguments Examples

View source: R/plot.dsdive.R

Description

Builds a ggplot2 graph.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'dsdive'
plot(
  x,
  depth.bins,
  imputed.alpha = 0.3,
  dsobs = NULL,
  imputed.list = NULL,
  underlay = NULL,
  time.as.POSIXct = FALSE,
  ...
)

Arguments

x

dsdive object with complete record of dive trajectory

depth.bins

n x 2 Matrix that defines the depth bins. The first column defines the depth at the center of each depth bin, and the second column defines the half-width of each bin.

imputed.alpha

transparency value used for plotting imputed trajectories, if provided

dsobs

dsobs object with record of observed depth bins to overlay on the main dsdive trajectory x

imputed.list

A list of dsdive objects to be plotted underneath the main dsdive trajectory x. The intent is that imputed.list will contain imputed trajectories.

underlay

additional ggplot2 layers to place before the main plot layers

time.as.POSIXct

if TRUE, will convert plotting times to POSIXct

...

(currently unused) additional plotting parameters

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data('dive.sim')
attach(dive.sim)

# basic plot
pl = plot(x = sim, depth.bins = depth.bins)

# plot with observations overlaid
pl2 = plot(x = sim, depth.bins = depth.bins, dsobs = sim.obs)

# plot with "imputed" trajectory overlaid
pl3 = plot(x = sim, depth.bins = depth.bins, dsobs = sim.obs, 
           imputed.list = sim)

detach(dive.sim)

jmhewitt/dsdive documentation built on May 29, 2020, 5:18 p.m.