plot_tracks: Plot paths

Description Usage Arguments Value Examples

View source: R/tracks_plots.R

Description

Only plots a path between subsequent frames.

Usage

1
2
3
4
5
## S3 method for class 'tracks'
plot(x, ...)

plot_tracks(tracks, color = ~animal, facet = ~trial, nrow = NULL,
  ncol = NULL)

Arguments

x

A tracks object.

...

Pass arguments to plot_tracks.

tracks

A tracks object.

color

Color specification of the path as a formula (e.g. ~animal).

facet

Facet specification as a formula (e.g. ~trial), passed to facet_wrap.

nrow

Control number of rows for the facets.

ncol

Control number of columns for the facets.

Value

A ggplot object.

Examples

1
2
3
4
5
6
7
8
Guppies <- as_tracks(guppies, 30, 1080)
plot(Guppies)
# No animal coloring
plot(Guppies, color = NULL)
# Plot trials in the same panel
plot(Guppies, color = ~animal:trial,facet = ~1)
# more complex facetting
plot(Guppies, facet = ~trial + animal, ncol = 8)

Ax3man/trackr documentation built on Oct. 8, 2019, 10:53 p.m.