plot.simulation_results: Plot the results of a simulation

Description Usage Arguments Examples

Description

Methods to visually inspect the results of a simulation. Both linear graphs and spatial-explicit grids can be generated to illustrate population changes through time and space.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## S3 method for class 'simulation_results'
plot(
  x,
  object = "population",
  type = "graph",
  stages = NULL,
  animate = FALSE,
  timesteps = c(1:3),
  panels = c(3, 3),
  emp = FALSE,
  ...
)

Arguments

x

a simulation_results object

object

the simulation_results object to plot - can be 'population' (default), 'suitability' or 'carrying_capacity'

type

the plot type - 'graph' (default) or 'raster'

stages

life-stages to plot - by default all life-stages will be considered. Set to zero for totals (i.e. sum of all life-stages). For raster plotting, the life-stages that are specified will be summed, unless a single life-stage is specified.

animate

if plotting type 'raster' would you like to animate the rasters?

timesteps

timesteps to display when plotting rasters

panels

the number of columns and rows to use when plotting raster timeseries - default is 3 x 3 (e.g. c(3, 3) )

emp

should the expected minimum population of the simulation be plotted?

...

further arguments passed to/from other methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## 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 population trajectories by life-stage
plot(sim)

# Plot the spatial distributions of total populations for first nine timesteps
plot(sim, type = "raster", stages = 0, timesteps = 1:9) 

## End(Not run)

steps documentation built on March 3, 2021, 5:06 p.m.