Learn R Programming

trajr (version 1.0.0)

plot.Trajectory: Plot method for trajectories

Description

The plot method for Trajectory objects.

Usage

# S3 method for Trajectory
plot(x, add = FALSE, draw.start.pt = TRUE,
  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))), asp = 1, ...)

Arguments

x

An object of class "Trajectory", the trajectory to be plotted.

add

If TRUE, the trajectory is added to the current plot.

draw.start.pt

If TRUE, draws a dot at the start point of the trajectory.

turning.angles

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.

xlim, ylim, xlab, ylab, asp

plotting parameters with useful defaults.

...

Additional arguments are passed to plot.

See Also

TrajFromCoords

Examples

Run this code
# NOT RUN {
set.seed(42)
trj <- TrajGenerate(angularErrorSd = 1.3)
plot(trj)

# }

Run the code above in your browser using DataLab