plot_allocation.Rd
Plots croptype allocation in the landscape at a given year of the simulation
plot_allocation(
landscape,
year,
croptype_names = c(),
title = "",
subtitle = "",
filename = "landscape.png"
)
a SpatialPolygonsDataFrame
year to be plotted
croptype names (for legend)
title of the graphic
subtitle of the graphic
name of the .png file to be generated
a png file.
if (FALSE) {
landscape <- landscapeTEST1
croptypes <- data.frame(sample.int(3, length(landscape), replace = TRUE))
allocation <- SpatialPolygonsDataFrame(landscape, croptypes, match.ID = TRUE)
plot_allocation(allocation, 1,
title = "Simulated landscape", subtitle = "Year 1",
filename = paste(getwd(), "/landscape.png", sep = "")
)
}