From 7aa348a0cf6b50b8a84ef72174040979cd5e26f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Sch=C3=BCrz?= <christoph.schuerz@ufz.de> Date: Mon, 14 Aug 2023 11:36:38 +0200 Subject: [PATCH] Fix misalignement of crop periods in plot_hru_pw_day --- DESCRIPTION | 2 +- R/plot_hru_pw.R | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4ecfcea..90b5e63 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: SWATdoctR Type: Package Title: Finding the right diagnoses and treatments for SWAT+ models -Version: 0.1.19 +Version: 0.1.20 Author: c(person("Christoph", "Schürz", email = "christoph.schuerz@ufz.de", role = c("aut", "cre")), diff --git a/R/plot_hru_pw.R b/R/plot_hru_pw.R index 6666988..4048158 100644 --- a/R/plot_hru_pw.R +++ b/R/plot_hru_pw.R @@ -131,6 +131,7 @@ plot_hru_pw_day <- function(sim_verify, hru_id, var, years = 1900:2100, add_crop gg_crop <- ggplot(crop_dates) + geom_rect(aes(xmin = start, xmax = end, ymin = id- 0.35, ymax = id + 0.35, fill = hru)) + geom_text(aes(x = mid, y = id, label = op_typ)) + + scale_x_date(limits = c(min(plot_data$date), max(plot_data$date))) + scale_y_continuous(breaks = y_labels$id, labels = y_labels$hru) + scale_fill_manual(values = crop_col_assign$col) + labs(y = 'hru') + -- GitLab