Learn R Programming

DEPONS2R (version 1.2.6)

plot,DeponsDyn,missing-method: Plot a DeponsDyn object

Description

Plot population dynamics simulated with DEPONS

Usage

# S4 method for DeponsDyn,missing
plot(x, y, dilute = 5, plot.energy = TRUE, plot.legend = TRUE, ...)

Arguments

x

DeponsDyn object

y

Not used

dilute

Integer. Plot only one in every 'dilute' values. Defaults to 5, which yields a plot of the first simulated value and one in every five of the following values.

plot.energy

If set to TRUE it plots the amount of energy stored in simulated and in the landscape in addition to the population count

plot.legend

If set to TRUE, a legend is plotted

...

Optional plotting parameters

Examples

Run this code
data("porpoisedyn")

# Plot for specific range of years
rg <- c(as.POSIXlt("2011-01-01", tz = "UTC"), as.POSIXlt("2018-12-31", tz = "UTC"))
plot(porpoisedyn, xlim=as.POSIXct(rg), plot.energy=TRUE)

if (FALSE) {
# Read data from default DEPONS simulation directory:
sim.dir <- "/Applications/DEPONS 2.1/DEPONS"
new.sim.name <- get.latest.sim(dir=sim.dir)
new.sim.out <- read.DeponsDyn(fname=paste(sim.dir, new.sim.name, sep="/"))
plot(new.sim.out)
}

Run the code above in your browser using DataLab