From b2a3c8c889db37025ec5cc550e2eab37a817cff5 Mon Sep 17 00:00:00 2001
From: biopsichas <svajunas.plunge@gmail.com>
Date: Tue, 21 Mar 2023 15:59:29 +0200
Subject: [PATCH] small edit in plot_qtile

---
 R/plot_ps_tile.R | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/R/plot_ps_tile.R b/R/plot_ps_tile.R
index 7d6b287..78624c8 100644
--- a/R/plot_ps_tile.R
+++ b/R/plot_ps_tile.R
@@ -118,8 +118,8 @@ plot_qtile <- function(sim_verify, exclude_lum = c("urhd_lum", "urmd_lum", "urml
     left_join(., sim_verify$lum_mgt, by = "id") %>%
     filter(tile != 'null')
 
-  hru_frac <- paste0(as.character(round(100*count(df)/count(sim_verify$hru_wb_aa),2)), " % HRUs are drained in this catchment.")
-
+  hru_frac <- paste0("The plot was created for HRUs with tile drainage active (",
+                      as.character(round(100*count(df)/count(sim_verify$hru_wb_aa),2)), "% of all HRUs).")
   df <- df %>%
     filter(!lu_mgt %in% exclude_lum) %>%
     select(id, qtile, lu_mgt, mgt, soil) %>%
@@ -129,8 +129,7 @@ plot_qtile <- function(sim_verify, exclude_lum = c("urhd_lum", "urmd_lum", "urml
     geom_histogram(aes(y=after_stat(density)), color="black", fill="blue", breaks = seq(min(df$qtile), max(df$qtile), 10))+
     geom_density(alpha=.3, fill="white", linewidth = 1, color = "grey25", linetype = "twodash")+
     labs(title = "Tile drain flow density mm/year",
-         subtitle = hru_frac,
-         caption = "Data in the figure represents only HRUs with active tile drainage.")+
+         subtitle = hru_frac)+
     theme_bw()+
     theme(panel.border = element_blank(),
           axis.line = element_line(color='black'),
-- 
GitLab