patchdistr_sews_plot | R Documentation |
Plot early-warning signals based on patch size distributions
## S3 method for class 'patchdistr_sews'
plot(x, along = NULL, ...)
plot_distr(x, along = NULL, best_only = TRUE, plrange = TRUE)
x |
An object as produced by |
along |
A vector providing values along which the indicator trends
will be plotted. If |
... |
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 |
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.
patchdistr_sews
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"])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.