The plot
method for Trajectory objects.
# S3 method for Trajectory
plot(
x,
add = FALSE,
draw.start.pt = TRUE,
start.pt.cex = 0.8,
start.pt.pch = 16,
start.pt.col = "black",
turning.angles = NULL,
xlim = grDevices::extendrange(x$x),
ylim = grDevices::extendrange(x$y),
xlab = ifelse(is.null(TrajGetUnits(x)), "x", sprintf("x (%s)", TrajGetUnits(x))),
ylab = ifelse(is.null(TrajGetUnits(x)), "y", sprintf("y (%s)", TrajGetUnits(x))),
ann = graphics::par("ann"),
axes = TRUE,
frame.plot = axes,
asp = 1,
...
)
An object of class "Trajectory", the trajectory to be plotted.
If TRUE, the trajectory is added to the current plot.
If TRUE, draws a dot at the start point of the trajectory.
Scale to apply when drawing the start point dot.
Pch (i.e. plot character, symbol or shape) to apply when drawing the start point dot.
Colour to apply when drawing the start point dot.
If "random"
or "directed"
, draws step turning
angles. "directed"
assumes errors are relative to the first recorded
step angle. "random"
assumes errors are relative to the previous step.
plotting parameters with useful defaults.
TrajFromCoords
set.seed(42)
trj <- TrajGenerate(angularErrorSd = 1.3)
plot(trj)
Run the code above in your browser using DataLab