Skip to contents

plot_variable_at_harvkill plots boxplots of one of the variables crop heat unit fractions ('phu'), crop yields ('yield'), or plant biomass ('bioms') for crops at harvest-kill of a crop separated for all identified crops.

Usage

plot_variable_at_harvkill(sim_verify, variable, years = 1900:2100)

Arguments

sim_verify

Simulation output of the function run_swat_verification() as a single object or as a list of objects (representing run_swat_verification() function runs with different settings). To plot the heat units at least the output option outputs = 'mgt' must be set in run_swat_verification().

variable

Selected variable to be plotted. Must be one of: 'phu', 'yield', 'bioms'

years

Simulated years which are aggregated in the boxplot

Value

ggplot boxplot the selected variable at harvest-kill.

Examples

if (FALSE) { # \dontrun{
##As single object
plot_variable_at_harvkill(sim_nostress, 'yield')
##As a list
sim_list<- list(
no_stress = sim_nostress,
only_nutrient = sim_nutrientstress,
all_stress = sim_allstress)
plot_variable_at_harvkill(sim_list, 'yield')
} # }