Skip to contents

`plot_crop_calendar()` makes a plot of the calendar of one or more crops. It* can plot any crop calendar prepared with `prepare_calendar()`.

Usage

plot_crop_calendar(
  path,
  culture = NULL,
  col = NULL,
  language = "EN",
  legend = TRUE,
  reference = NULL,
  order_phase = NULL,
  output_prefix = NULL,
  output_format = c("none", "pdf", "png", "jpg", "svg"),
  verbose = TRUE
)

Arguments

path

list describing where to find useful paths.

culture

character, name of crops to be plotted. If set to NULL, all crops prepared with `prepare_culture()` and `prepare_calendar()` will be plotted. Default to NULL.

col

character, named or unnamed vector of colors for plot. Must be at least of the same length as crops phases. If col is unnamed, the attribution of colors to crop phases will be made by default, you must set names of col accordingly to values of crop phases if you want to control the colors for each phase. If NULL, default colors will be picked from the library("RColorBrewer"). Default to NULL.

language

character, language for plot labels. Must be chosen from one of c("EN", "FR"). Default to "EN".

legend

logical, should there be a legend or not. Default set to TRUE

reference

character, culture to place on top of graphic to compare with others. If set to NULL, order is set alphabetically. Default to NULL.

order_phase

character, phase used to sort calendars on graph. If set to NULL, the order is set alphabetically except if a `reference` is defined. Default to NULL.

output_prefix

character, prefix to give to output file. Default to

output_format

character, choice for the output format if saving is desired. If NULL or "none", plot will not be saved but will be shown. Default to NULL.

verbose

logical, should the function send some messages while running.

Value

Plot of one or more crop calendar. It can be simply shown or saved in the `output_format` format in the output directory from `path[["output"]][["figure"]]`