shar (version 1.1)

plot_energy: plot_energy

Description

Plot energy of pattern reconstruction

Usage

plot_energy(pattern, col = NULL)

Arguments

pattern

List with reconstructed patterns.

col

Vector with colors. Must be as long as n_random.

Details

The function plots the decrease of the energy over time, i.e. the iterations. This can help to identify if enough max_runs where chosen for the reconstruction.

See Also

calculate_energy reconstruct_pattern_homo reconstruct_pattern_hetero reconstruct_pattern_cluster plot_randomized_pattern

Examples

Run this code
# NOT RUN {
pattern_recon <- reconstruct_pattern_homo(species_a, n_random = 3, max_runs = 1000)
plot_energy(pattern_recon)

marks_sub <- spatstat::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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab