plot.simulation_results: Plot the results of a simulation

plot.simulation_resultsR Documentation

Plot the results of a simulation

Description

Methods to visually inspect the results of a simulation. Both linear graphs and spatial-explicit grids are generated for all timesteps to illustrate population changes through time and space. Note, this function can be wrapped in a *png()* call to write several images to disk for creating animations.

Usage

## S3 method for class 'simulation_results'
plot(x, replicates = 1, ...)

Arguments

x

a simulation_results object

replicates

which replicates to plot (default is one, or the first)

...

further arguments passed to/from other methods

Examples


## Not run: 
ls <- landscape(population = egk_pop, suitability = egk_hab, carrying_capacity = egk_k)

pd <- population_dynamics(change = growth(egk_mat),
                          dispersal = kernel_dispersal(max_distance = 2000,
                                        dispersal_kernel = exponential_dispersal_kernel(
                                          distance_decay = 1000)),
                          density_dependence = ceiling_density())

sim <- simulation(landscape = ls,
                  population_dynamics = pd,
                  habitat_dynamics = NULL,
                  timesteps = 20)

# Plot the spatial distributions of total cell populations
plot(sim) 

## End(Not run)

steps documentation built on Oct. 5, 2022, 1:06 a.m.