plot_track: Plot a Trajectory in Euclidean Space

View source: R/plotting_functions.R

plot_trackR Documentation

Plot a Trajectory in Euclidean Space

Description

This function plots the locations of a trajectory or multiple trajectories.

Usage

plot_track(traj = NULL, x_coord = NULL, y_coord = NULL)

Arguments

traj

data.frame containing the trajectory produced by e.g. traj_sim(). It must contain the columns traj$pos_x and traj$pos_y. It is also possible to specify a list of such data.frames containing multiple trajectories.

x_coord

(alternatively) numeric vector of x-coordinates or a list of x-coordinate vectors of multiple trajectories.

y_coord

(alternatively) numeric vector of y-coordinates or a list of y-coordinate vectors of multiple trajectories.

Value

A 'ggplot' object.

References

\insertRef

Hodelapplcylcop

\insertRef

Hodelmethodcylcop

See Also

plot_cop_scat(), plot_joint_circ(), plot_cop_surf(), plot_joint_scat().

Examples

set.seed(123)
traj <- traj_sim(50,
  copula = cyl_quadsec(0.1),
  marginal_circ = list(name = "vonmises", coef  = list(0, 1)),
  marginal_lin = list(name = "weibull", coef = list(shape = 3))
)
plot1 <- plot_track(traj=traj)

x_coord <- list(runif(10),runif(20),runif(3))
y_coord <- list(runif(10),runif(20),runif(3))

plot2 <- plot_track(x_coord=x_coord, y_coord=y_coord)


cylcop documentation built on Oct. 30, 2022, 1:05 a.m.