This function generates an ombrothermic plot from meteo data stored in the self$meteo attribute of the user_data object.
It displays daily rainfall (in mm) as bars and daily minimum, mean, and maximum temperatures (in °C) as lines.
The x-axis shows the months (horizontal labels) and the specific dates where rainfall exceeded 5 mm (vertical labels aligned below the axis).
Utilisation
plot_meteo(
self,
start_day = NULL,
end_day = NULL,
rain_date_labels = TRUE,
ppp_marks = TRUE,
obs_marks = TRUE
)Arguments
- self
A
user_dataR6 object containing ameteodata.frame- start_day
Optional start date for filtering the data (format
YYYY-MM-DDorDD/MM/YYYY).- end_day
Optional end date for filtering the data.
- rain_date_labels
Logical, default
TRUE. IfTRUE, adds date labels above rainfall bars whererain_mm > 5.- ppp_marks
Logical, default
TRUE. IfTRUE, draws treatment markers using unique dates found inself$metadata$ppp$p_app_datewithin the filtered range.- obs_marks
Logical, default
TRUE. IfTRUE, draws observation markers using uniqueobservation_datevalues merged from all data frames inself$obs_datawithin the filtered range.
Valeur de retour
A ggplot object representing the ombrothermic chart.
The used data (after cleaning and filtering) is attached as an attribute "data_used".
Exemples
if (FALSE) { # \dontrun{
# example code
# where mydata is the object into which the user_data class has been loaded
mydata <- user_data$new(trial_file = "path to our trial file")
plot_meteo(mydata,
start_day = "01/04/2025",
end_day = "30/07/2025",
rain_date_labels = FALSE)
} # }
