plot.trajectory {navigation} | R Documentation |
Plot a trajectory
object
Description
Plot a trajectory
object in 2D or 3D.
Usage
## S3 method for class 'trajectory'
plot(
x,
threeD = FALSE,
col = "#2980b9",
col_start = "#e67e22",
col_end = "#e67e22",
pch_points_start = 15,
pch_points_end = 16,
cex_points = 1.5,
add_altitude = TRUE,
n_split = 6,
plot_end_points = TRUE,
add_title = TRUE,
threeD_line_width = 4,
threeD_line_color = "#008080",
threeD_col_grad = FALSE,
threeD_grad_start = "#008080",
threeD_grad_end = "#ab53cf",
...
)
Arguments
x |
A |
threeD |
A |
col |
A |
col_start |
A |
col_end |
A |
pch_points_start |
A |
pch_points_end |
A |
cex_points |
A |
add_altitude |
A |
n_split |
A |
plot_end_points |
A |
add_title |
A |
threeD_line_width |
A |
threeD_line_color |
A |
threeD_col_grad |
A |
threeD_grad_start |
A |
threeD_grad_end |
A |
... |
Additional arguments affecting the plot produced. |
Value
A trajectory plot.
Author(s)
Davide Cucci, Lionel Voirol, Mehran Khaghani, Stéphane Guerrier
Examples
n <- 100
set.seed(123)
dat <- cbind(
seq(from = 0, to = 60 * 60, length.out = n),
46.204391 * pi / 180 + cumsum(rnorm(n)) / 10^5,
6.143158 * pi / 180 + cumsum(rnorm(n)) / 10^5,
375 + cumsum(rnorm(n))
)
traj <- make_trajectory(data = dat, name = "My cool data")
plot(traj)
plot(traj, threeD = TRUE)
plot(traj,
threeD = TRUE, threeD_line_width = 8,
threeD_line_color = "#e74c3c"
)
plot(traj,
threeD = TRUE,
threeD_col_grad = TRUE
)
plot(traj,
threeD = TRUE, threeD_col_grad = TRUE,
threeD_grad_start = "#e74c3c",
threeD_grad_end = "#d68910"
)
traj <- make_trajectory(data = dat, name = "My cool data", system = "ned")
plot(traj)
plot(traj, col = "orange2", col_start = "pink", col_end = "purple")
plot(traj, pch_points_start = 15, cex_points = 3)
plot(traj, plot_end_points = FALSE)
plot(traj, plot_end_points = FALSE, add_title = FALSE)