Learn R Programming

cylcop (version 0.2.0)

plot_track: 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)

Value

A 'ggplot' object.

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.

References

Hodelapplcylcop

Hodelmethodcylcop

See Also

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

Examples

Run this code
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)

Run the code above in your browser using DataLab