powered by
The spatialanimation function plots the individuals of the selected stages over time. Use plotsnapshot for plotting a single instant.
spatialanimation(data, times = seq(0, data$maxtime, length.out = 50), interval = 0.1, draw = data$num.total:1, radius = data$param$radius[draw], color = colorRampPalette(c("darkred", "lightgreen"))(length(draw)), movie.name = "facilitationmovie.gif", xlim = c(0, data$w), ylim = c(0, data$h))plotsnapshot(data, t, ...)
plotsnapshot(data, t, ...)
result of a simulation, created by community
community
array of times at which to plot
a time length to wait between frames
an array of stages id, to be drawn bottom to top. Absent stages will not be drawn.
Optional. Array representing the sizes in which the individuals will be drawn. Defaults to interaction radius.
Optional. A color vector
The filename of the gif that will be saved.
Optional. Limits to the x-axis
Optional. Limits to the y-axis
a single time at which to plot
additional parameters to be passed to spatialanimation
# NOT RUN { data(twospecies) spatialanimation(twospecies,draw=c(5,3),times=seq(0,10,1),movie.name="ts.gif") data(twospecies) plotsnapshot(twospecies,t=10) # }
Run the code above in your browser using DataLab