shar (version 2.3)

plot_energy: plot_energy

Description

Plot energy of pattern reconstruction

Usage

plot_energy(pattern, col = NULL)

Value

void

Arguments

pattern

rd_pat or rd_mar object with randomized patterns.

col

Vector with colors. Must be the same length as n_random.

Details

The function plots the decrease of the energy over time, i.e. the iterations. This can help to identify if the chosen max_runs for the reconstruction were sufficient. The pattern object must have been created using reconstruct_pattern_* .

See Also

reconstruct_pattern
fit_point_process

Examples

Run this code
if (FALSE) {
pattern_recon <- reconstruct_pattern(species_a, n_random = 3, max_runs = 1000)
plot_energy(pattern_recon)

marks_sub <- spatstat.geom::subset.ppp(species_a, select = dbh)
marks_recon <- reconstruct_pattern_marks(pattern_recon$randomized[[1]], marks_sub,
n_random = 1, max_runs = 1000)
plot_energy(marks_recon)
}

Run the code above in your browser using DataLab