plot_traj3d: Visualize trajectories using RGL 3D.

View source: R/plot_mobility.R

plot_traj3dR Documentation

Visualize trajectories using RGL 3D.

Description

Visualize trajectories using RGL 3D.

Usage

plot_traj3d(
  x,
  y,
  t,
  group_by = NULL,
  col = NULL,
  xlab = "",
  ylab = "",
  tlab = "",
  ...
)

Arguments

x, y

Numeric vectors of spatial coordinates

t

The temporal vector for each (x,y) point.

group_by

A group indicator when multiple users are visualized.

col

A vector of color strings. It must have the same length as unique(group_by).

xlab, ylab, tlab

The labels for each axis.

...

Other parameters for plot3d or axes3d

Examples

data(movement)

users <- subset(movement, id %in% c(23, 20)) %>%
 mutate(time = time/86400 - min(time/86400)) %>%
 dplyr::filter(time <= 30)
## Not run: 
plot_traj3d(users$lon, users$lat, users$time,
 group_by=users$id, col=c('royalblue', 'orangered'))

invisible(readline(prompt="Press [enter] to continue"))
traj3d.close()

## End(Not run)

caesar0301/movr documentation built on June 18, 2022, 2:37 a.m.