This function can be added to ggplot() to plot an sftrack and sftraj Function does not yet work with ggplot grammer so you must but data= in this function

geom_sftrack(mapping, data, ...)

# S3 method for sftrack
geom_sftrack(mapping = ggplot2::aes(), data = NULL, ...)

# S3 method for sftraj
geom_sftrack(mapping = ggplot2::aes(), data = NULL, ..., step_mode = FALSE)

Arguments

mapping

mapping aesthetics for ggplot.

data

the sftraj or sftrack object.

...

arguments to passed to ggplot

step_mode

TRUE/FALSE, whether to plot in step_mode, See details

Details

step mode refers to considering the trajectory as individual 'steps', in the case of plot this means it will plot each line & point individually. This approach is much slower to plot when n(steps)>10,000. The alternative method is to merge the steps into a multilinestring of continuous lines. This is much faster to plot.

Examples

#> Loading required package: ggplot2
ggplot() + geom_sftrack(data = racc_traj)