plotTrack: plot result of 'rxtracto'

View source: R/plotTrack.R

plotTrackR Documentation

plot result of 'rxtracto'

Description

plotTrack is a function to plot the results from 'rxtracto()'

Usage

plotTrack(
  resp,
  xcoord,
  ycoord,
  tcoord,
  plotColor = "viridis",
  myFunc = NA,
  mapData = NULL,
  crs = NULL,
  animate = FALSE,
  cumulative = FALSE,
  name = NA,
  shape = 20,
  size = 0.5
)

Arguments

resp

data frame returned from 'rxtracto()'

xcoord

passed to 'rxtracto()'

ycoord

passed to 'rxtracto()'

tcoord

passed to 'rxtracto()'

plotColor

the color to use in plot from 'cmocean'

myFunc

function of one argument to transform the data

mapData

map data from 'maps' or 'mapdata', must be of class 'map'

crs

valid crs string

animate

if multiple times, if TRUE will animate the maps

cumulative

makes cumulative animation of data

name

name for colorbar label

shape

shape to use to mark track

size

size of shape to use to mark track

Value

a 'plotdap' plot

Examples

## example data download for plotTrack
## tagData <- Marlintag38606
## xpos <- tagData$lon[1:20]
## ypos <- tagData$lat[1:20]
## tpos <- tagData$date[1:20]
## zpos <- rep(0., length(xpos))

## example data download for plotTrack
## swchlInfo <- rerddap::info('erdSWchla8day')
##scwchl <- rxtracto(swchlInfo, parameter = 'chlorophyll', xcoord = xpos,
##        ycoord = ypos, tcoord = tpos, zcoord = zpos, xlen = .2, ylen = .2)
##
# suppressWarnings(p <- plotTrack(swchl, xpos, ypos, tpos, plotColor = 'algae'))

rerddapXtracto documentation built on Sept. 11, 2024, 5:19 p.m.