plot.sim_post: plot

View source: R/plot.sim_post.R

plot.sim_postR Documentation

plot

Description

visualize tracks simulated from a aniMotum model fit

Usage

## S3 method for class 'sim_post'
plot(
  x,
  type = c("lines", "points", "both"),
  zoom = TRUE,
  ncol = 1,
  hires = TRUE,
  ortho = TRUE,
  alpha = 0.5,
  ...
)

Arguments

x

a aniMotum simulation data.frame with class sim_fit

type

plots tracks as "line", "points" or "both" (default).

zoom

logical; should map extent be defined by track extent (TRUE; default) or should global map be drawn (FALSE).

ncol

number of columns to arrange multiple plots

hires

logical; use high-resolution coastline data. Attempts to use high-res coastline data via rnaturalearth::ne_countries with scale = 10, if the rnaturalearthhires data package is installed. If not, then rnaturalearth::ne_countries with scale = 50 data are used.

ortho

logical; use an orthographic projection centered on the track starting location(s) (TRUE; default). An orthographic projection may be optimal for high latitude tracks and/or tracks that traverse long distances. If FALSE then a global Mercator projection is used.

alpha

opacity of simulated track points/lines. Lower opacity can ease visualization when multiple simulated overlap one another.

...

additional arguments to be ignored

Value

Plots of posterior simulated tracks.

Examples

fit <- fit_ssm(ellie, model = "crw", time.step = 24)
psim <- sim_post(fit, what = "p", reps = 10)
plot(psim, type = "lines")


ianjonsen/foieGras documentation built on Jan. 17, 2025, 11:15 p.m.