Plot disaggregated damage functions
plot_disaggregated_damage_function.Rd
`plot_disaggregated_damage_function()` makes a plot of disaggregated damage curves. It can plot any damage function that has been combined with `combine_damaging()`.
Usage
plot_disaggregated_damage_function(
path,
damage_path = NULL,
current = NULL,
duration = NULL,
height = NULL,
col = NULL,
culture = NULL,
title_culture = FALSE,
add_hazard_info = TRUE,
output_name = NULL,
language = "EN",
hazard = floodam.agri::HAZARD,
verbose = TRUE,
legend = TRUE,
legend_pos = c("topleft", "topright", "top", "bottomright", "bottom", "bottomleft",
"left", "right", "export_horizontal", "export_vertical")
)
Arguments
- path
list describing where to find useful paths.
- damage_path
character, path to folder where to find damage curves. If NULL, damage_path is set to `path[["output"]][["combine"]]`. Default to NULL.
- current
numeric, current to be plotted. Default to NULL.
- duration
numeric, duration to be plotted. Default to NULL.
- height
numeric, height to be plotted. Default to NULL.
- col
character, named or unnamed vector of colors for plot lines. Must be at least of the same length as culture. If col is unnamed, the attribution of colors to culture will be made by default, you must set names of col accordingly to values of culture if you want to control the colors for each crop. If NULL, default colors will be picked from the library("RColorBrewer"). Default to NULL.
- culture
character, name of crops to be plotted. If set to NULL, all crops available in the provided damage function will be plotted. Default to NULL.
- title_culture
logical, should shown crop names on plot be modified. If set to TRUE, `plot_damage_function()` will look for the first available `title.culture.csv` in `path[[<extent>]][["typology"]]`. Default to FALSE.
- add_hazard_info
logical, should there be annotations giving the hazard parameters of the plotted damage curves. Default to TRUE.
- output_name
character, name to give to output file. Output format can be one of c("pdf", "png", "jpg", "svg"). If NULL, the plot will not be exported. Default to NULL.
- language
character, language for plot labels. Must be chosen from one of c("EN", "FR"). Default to "EN".
- hazard
character, name of hazard parameters. Default to floodam.agri::HAZARD.
- verbose
logical, should the function send some messages while running.
- legend
logical, should a legend be added to the plot. Default position is given by the argument `legend_pos`.
- legend_pos
character, position of legend inside the plot. One of c( "topleft", "top", "topright", "bottomright", "bottom", "bottomleft", "left", "right", "export_horizontal", "export_vertical")