Learn R Programming

spatialwarnings (version 1.2)

patchdistr_sews_plot: Early-warning signals based on patch size distributions

Description

Plot early-warning signals based on patch size distributions

Usage

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

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

Arguments

x

An object as produced by spectral_sews

along

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

...

Further arguments passed to methods

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 complex figure summarizing the change 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_spectrum 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. This mode of representation can be cumbersome when working with a high number of matrices but displays the full shape of the distributions.

See Also

patchdistr_sews

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
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"])
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab