View source: R/plot_mobility.R
plot_traj3d | R Documentation |
Visualize trajectories using RGL 3D.
plot_traj3d( x, y, t, group_by = NULL, col = NULL, xlab = "", ylab = "", tlab = "", ... )
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 |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.