Skip to contents

Plot energy of pattern reconstruction

Usage

plot_energy(pattern, col = NULL)

Arguments

pattern

rd_pat or rd_mar object with randomized patterns.

col

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

Value

void

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_* .

Examples

if (FALSE) { # \dontrun{
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)
} # }