diff --git a/NAMESPACE b/NAMESPACE index e6b81df..6beef13 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -83,6 +83,7 @@ importFrom(ggplot2,geom_smooth) importFrom(ggplot2,geom_text) importFrom(ggplot2,ggplot) importFrom(ggplot2,ggtitle) +importFrom(ggplot2,labs) importFrom(ggplot2,theme) importFrom(ggplot2,theme_bw) importFrom(ggplot2,theme_minimal) diff --git a/R/plotting.R b/R/plotting.R index a304093..227c7e4 100644 --- a/R/plotting.R +++ b/R/plotting.R @@ -397,7 +397,7 @@ plot_weather_compare <- function(meteo_lst1, meteo_lst2, par, period = "day", fn #' @param title character, information to be added in figure title #' @importFrom dplyr %>% filter select mutate bind_rows #' @importFrom tidyr pivot_longer -#' @importFrom ggplot2 ggplot geom_bar facet_wrap ggtitle aes theme_minimal +#' @importFrom ggplot2 ggplot geom_bar facet_wrap ggtitle aes theme_minimal labs #' @return ggplot figure of bar plots #' @export #' @@ -447,10 +447,10 @@ plot_wgn_comparison <- function(meteo_lst1, meteo_lst2, station1, station2, type mutate(source = type2) ##Bar plot - fig <- ggplot(bind_rows(df1,df2), aes(x = month, y = values, fill = source))+ + fig <- ggplot(bind_rows(df1,df2), aes(x = as.factor(month), y = values, fill = source))+ geom_bar(stat='identity', position = "dodge")+ facet_wrap(~par, scales = "free")+ - ggtitle(paste(type1, "vs.", type2, title))+ + labs(title=paste(type1, "vs.", type2, title), x ="Months", y = "Values")+ theme_minimal() return(fig) diff --git a/docs/404.html b/docs/404.html index bec9415..31bb017 100644 --- a/docs/404.html +++ b/docs/404.html @@ -51,6 +51,7 @@ Land use Soil parameters Weather data + Climate data