From 94402310c4a45851f61a8499a4e88eb3a59fec07 Mon Sep 17 00:00:00 2001 From: "louis.heraut" <louis.heraut@inrae.fr> Date: Sun, 23 Jan 2022 04:18:51 +0100 Subject: [PATCH] INI variable --- plotting/matrix.R | 11 ++++++----- script.R | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/plotting/matrix.R b/plotting/matrix.R index 6b50d4f..e376c8e 100644 --- a/plotting/matrix.R +++ b/plotting/matrix.R @@ -523,12 +523,12 @@ matrix_panel = function (list_df2plot, df_meta, trend_period, mean_period, slice # region plotted title = df_meta[df_meta$code == subCode[1],]$region_hydro - subtitle = paste(' ', iMat, '/', nMat,' ', type, + subtitle = paste(type, ' ', iMat, '/', nMat, sep='') # Postion and name of the title xt = 1 - 6 yt = height + 2 - Title = bquote(bold(.(title))[.(subtitle)]) + Title = bquote(bold(.(title))~'-'~.(subtitle)) # Writes the title mat = mat + annotate("text", x=xt, y=yt, @@ -563,12 +563,13 @@ matrix_panel = function (list_df2plot, df_meta, trend_period, mean_period, slice subColor_trend[subNPeriod_trend == j] # Converts the variable list into levels for factor - levels = unlist(Var_trend_per) + levels = unlist(subVar_trend[1:nbpMod]) + # Converts the vector of hydrological variable to # a vector of integer associated to those variable Xtmp = as.integer(factor(as.character(Var_trend_per), levels=levels)) - + # Computes X position of the column for # the period dates Xc = j + (j - 1)*nbpMod*2 @@ -749,7 +750,7 @@ matrix_panel = function (list_df2plot, df_meta, trend_period, mean_period, slice subColor_mean[subNPeriod_mean == j] # Converts the variable list into levels for factor - levels = unlist(Var_mean_per) + levels = unlist(subVar_mean[1:nbpMod]) # Converts the vector of hydrological variable to # a vector of integer associated to those variable Xtmp_mean = diff --git a/script.R b/script.R index db71de4..95bf318 100644 --- a/script.R +++ b/script.R @@ -244,9 +244,9 @@ res_VCN10trend = get_VCN10trend(df_data, df_meta, p_thresold=p_thresold) # Start date for low water trend -res_tINItrend = get_tINItrend(df_data, df_meta, - period=trend_period, - p_thresold=p_thresold) +# res_tINItrend = get_tINItrend(df_data, df_meta, + # period=trend_period, + # p_thresold=p_thresold) # Center date for low water trend res_tMIDtrend = get_tMIDtrend(df_data, df_meta, @@ -288,9 +288,9 @@ df_shapefile = ini_shapefile(computer_data_path, ### 4.2. Analysis layout datasheet_layout(toplot=c( - # 'datasheet', + 'datasheet', 'matrix', - # 'map' + 'map' ), df_meta=df_meta, -- GitLab