plot | R Documentation |
Function for plotting a recorded track from a Move object or the probability values from a DBBMM object
## S4 method for signature '.MoveTrackSingle,missing'
plot(x, y,asp=1, ...)
## S4 method for signature '.MoveTrackStack,missing'
plot(x, y, type="p",asp=1, ...)
## S4 method for signature '.MoveTrackSingleBurst,missing'
plot(x, y, type="p",asp=1, ...)
x |
a |
y |
unused variable (listed for compatibility reasons) |
type |
defines the type of the plot (e.g. 'l', 'p', 'b', 'o') |
asp |
defines the aspect ratio of the plot generally 1 makes most sense since the x and y dimensions are the same |
... |
arguments to be passed to methods, such as graphical parameters, and the logical |
If x
is a MoveBurst object colored lines (according to the burstID) are plotted if the type is set to 'l'. By default it is 'p' which plots the coordinates of the Move object as points.
If x
is a DBBMM, DBBMMStack, DBBMMBurstStack or dynBGB object its raster object is plotted with the corresponding cell values. Unlike the image
function, it keeps the same cell size ratio when the plot window is re-sized.
In the argument col
a vector of colors of the same length as the number of individual for a moveStack, or number of burst levels for a moveBurst object can be specified. If left empty the default 8 colors from R are used, which will be recycled if the object contains more individuals or burst levels (run palette()
to obtain vector of default colors).
Have a look on the proportion of the graphic device when printing a track or raster. The plot function does not use equal sized units on both axes.
Marco Smolla & Anne Scharf
points, lines
data(leroy)
data(fishers)
plot(leroy) # plot a Move object
plot(leroy, type="o", col=3)
plot(fishers, col=c(3,5), lwd=3) # plot a MoveStack object
plot(fishers, type="l", col=c(3,5), lwd=3)
data(dbbmmstack)
data(leroydbbmm)
plot(leroydbbmm) # plot the raster of a DBBMM object
plot(dbbmmstack) # plot the raster of a DBBMMStack object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.