rubitPlotPosition: Visualise an individual trajectory and positional information...

Description Usage Arguments Value See Also Examples

View source: R/plotPosition.R

Description

Plots a trajectory over a circular area, dividing the area into a number of grid cells of equal size to visualise exploration, and defining an outer perimeter to visualise thigmotaxis.

Usage

1
2
rubitPlotPosition(m, scale = 1, area_rad = NA, thigmo_dist = NA,
  n_radials = 1, n_slices = 1, n_bootstraps = 20)

Arguments

m

a matrix containing processed tracking data outputted by rubitBasic.

scale

a numeric to calibrate the true spatial scale, in pixels per mm. If scale == 1, measurements are returned in pixels. This value should match that used in rubitBasic.

area_rad

the minimum radius of the area. If an area shows insufficient movement to define a minimum enclosing circle of at least this radius, then a new minimum enclosing circle is calculated using area_rad and area metainformation stored in attributes(m). This unit is defined in pixels unless scale != 1.

thigmo_dist

the distance from the boundary perimeter defined as being central (i.e. not thigmotaxis). If thigmo_dist = NA, thigmotaxis is defined as movement in the outer 50% of the area (i.e. > R / sqrt(2) from the area centre, where R is the radius of the area). This unit is defined in pixels unless scale != 1.

n_radials

the number of concentric circles to divide a circular arena into

n_slices

the number of slices to divide a circular arena into

n_bootstraps

the number of random data samples used to calculate the minimum enclosing circle defining each circular area.

Value

a plot showing the divided circular area with full trajectory overlaid.

See Also

rubitCalcPosition for more on calculating positional information.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(tenebrio_basic)

### Single plot, with area divided into 96 cells
### and thigmotaxis defined in outer 20mm of area:
my_scale <- 2.08
rubitPlotPosition(tenebrio_basic[['05']], scale = my_scale, thigmo_dist = 20, n_radials = 8, n_slices = 12)

### Print plots for all areas in list to PDF:
#pdf("plots.pdf")
lapply(tenebrio_basic, rubitPlotPosition, scale = my_scale, thigmo_dist = 20, n_radials = 8, n_slices = 12)
#dev.off()

JoGall/rubitrail documentation built on May 7, 2019, 10:53 a.m.