plot.GAI | R Documentation |
Prints the flight path curves of a fitted GAI model with options to scale by estimated site total, and avoid plotting all sites by smoothing through results for each sites by taking a given quantile at each time point
## S3 method for class 'GAI' plot( GAIobj, all_sites = F, quantiles = c(0.05, 0.5, 0.95), scale_by_N = T, colours = hcl(h = seq(15, 375, length = 11), l = 65, c = 100)[1:10] %>% rep(10) )
GAIobj |
An object produced by using the summary.GAI function an a model output produce by fit_GAI. |
all_sites |
If TRUE, the curves for every single site are plotted rather than a smooth through the curves from each site. Defaults to FALSE. |
quantiles |
For when all_sites = F, a vector of quantiles that will each be used to produce a curve. Defaults to c(0.05, 0.5, 0.95) |
scale_by_N |
If TRUE, then the seasonal flight component for each site will be scaled by that site's estimated site total. Defaults to TRUE. |
colours |
A list of colour values to be used for plotting different curves. Defaults to the GGplot default 10 colour palette repeated 10 times to accommodate up to 100 sites (even when ggplot is not used) |
shift |
An optional parameter which can be used to shift the location of the key when using base graphics, as this can often be misplaced. |
useGGplot |
If TRUE, will use GGplot to produce the graphics instead of the standard base R graphics |
# A plot with default settings: fit_GAI(c(0, 0), example_data, "mixture") %>% plot # A plot with custom quantiles: fit_GAI(c(0, 0), example_data, "mixture") %>% plot(quantiles = c(0.01, 0.99)) # A plot with quantities not scaled by site totals: fit_GAI(c(0, 0), example_data, "mixture") %>% plot(scale_by_N = F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.