Description Usage Arguments Value Examples
Create a dynamic plot of fish detections
1 2 3 4 5 6 7 8 9 10 11 12 13 |
sldf |
A SpatialLineDataFrame representation of the river system. The CRS should match that of the detection data. |
detects |
Output of |
dir |
The directory of the folder where the plots should be output (eg. "D:/Jordy/myplots/"). The folder should end with a "/". |
extent |
A vector of length four specifying the plotting extent c(x_min, x_max, y_min, y_max) |
type |
The background to use (see |
darken |
Increase to darken the background when open_maps=T. Defaults to 1. |
col_by_fish |
col_by_fish=T assigns each fish a unique color. This color will be preserved between mappings (i.e. between different flight periods). |
viterbi |
Use viterbi=T to color by survival state using the viterbi path (detects needs to be the viterbi output from |
width |
The width of the plot. |
height |
The height of the plot. |
Static plots that plot the fish location by flight will be added to the folder along with a gif that iterates through the flights.
1 2 3 4 | # Note: Create a folder on your machine and make dir coorespond to this directory to run examples
# extent <- c(x_min=466060, x_max=1174579, y_min=6835662, y_max=7499016)
# gif_plot(sldf, viterbi, dir="S:/Jordy/telprep/telprep/gifs/viterbi/", extent=extent, viterbi=T)
# # gif_plot(sldf, best_detects, dir="S:/Jordy/telprep/telprep/gifs/byfish/", extent=extent, col_by_fish=T, viterbi=F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.