patchdistr_sews_plot: Early-warning signals based on patch size distributions

patchdistr_sews_plotR Documentation

Early-warning signals based on patch size distributions

Description

Plot early-warning signals based on patch size distributions

Usage

## S3 method for class 'patchdistr_sews'
plot(x, along = NULL, ...)

plot_distr(x, along = NULL, best_only = TRUE, plrange = TRUE)

Arguments

x

An object as produced by patchdistr_sews, or the result of indictest called on such object

along

A vector providing values along which the indicator trends will be plotted. If NULL then the values are plotted sequentially in their original order.

...

Ignored

best_only

Plot only the best fit the empirical (inverse cumulative) patch-size distribution with an overlay of the estimated fits.

plrange

Plot the power-law range

Details

The plot function will produce a figure summarizing the changes in patch size distributions along a set of values. The figure has two panels:

  • the upper panel shows the percolation status of empty (FALSE) and occupied cells (TRUE), and shows the mean value (proportion of TRUE values). The background shows the proportion of each type of distribution for each unique values of the along vector.

  • the bottom panel displays the power-law range

The plot_distr function displays each distribution in an individual facet, with an overlay of the best distribution fit and a blue bar showing the power-law range. If appropriate, a grey ribbon is used to display the expected distribution given the null expectation (i.e. when plot_distr is called on the results of indictest(). This function can produce quite crowded graphs, but it displays in full the shape of the distributions, and can be useful e.g. to assess the quality of the fits.

See Also

patchdistr_sews

Examples


 
data(forestgap)
psd_indic <- patchdistr_sews(forestgap)

plot(psd_indic, along = forestgap.pars[ ,"d"]) 

# When along is non-numeric, bars are used for display
plot(psd_indic, along = as.factor(forestgap.pars[ ,"d"]))

# Display individual distributions
plot_distr(psd_indic, along = forestgap.pars[ ,"d"])

# We can display the distributions along with the null expectation after 
# indictest() is run
psd_test <- indictest(psd_indic, nulln = 19)
plot_distr(psd_test, along = forestgap.pars[ ,"d"])



spatialwarnings documentation built on Sept. 11, 2024, 8:55 p.m.