Commit 0e2c036f authored by Heraut Louis's avatar Heraut Louis
Browse files

Aes for trend name

parent 46dc7437
No related merge requests found
Showing with 6 additions and 2 deletions
+6 -2
...@@ -174,6 +174,8 @@ time_panel = function (df_data_code, df_trend_code, type, p_threshold=0.1, missR ...@@ -174,6 +174,8 @@ time_panel = function (df_data_code, df_trend_code, type, p_threshold=0.1, missR
ltype = c('solid', 'dashed', 'dotted', 'twodash') ltype = c('solid', 'dashed', 'dotted', 'twodash')
lty = c('solid', '22') lty = c('solid', '22')
ii = 0
for (i in 1:nPeriod) { for (i in 1:nPeriod) {
df_trend_code_per = df_trend_code_per =
...@@ -182,6 +184,8 @@ time_panel = function (df_data_code, df_trend_code, type, p_threshold=0.1, missR ...@@ -182,6 +184,8 @@ time_panel = function (df_data_code, df_trend_code, type, p_threshold=0.1, missR
if (df_trend_code_per$p <= p_threshold) { if (df_trend_code_per$p <= p_threshold) {
ii = ii + 1
iStart = which.min(abs(df_data_code$Date - Start[i])) iStart = which.min(abs(df_data_code$Date - Start[i]))
iEnd = which.min(abs(df_data_code$Date - End[i])) iEnd = which.min(abs(df_data_code$Date - End[i]))
...@@ -210,11 +214,11 @@ time_panel = function (df_data_code, df_trend_code, type, p_threshold=0.1, missR ...@@ -210,11 +214,11 @@ time_panel = function (df_data_code, df_trend_code, type, p_threshold=0.1, missR
codeDate = df_data_code$Date codeDate = df_data_code$Date
codeQ = df_data_code$Qm3s codeQ = df_data_code$Qm3s
x = gpct(3, codeDate, shift=TRUE) x = gpct(2, codeDate, shift=TRUE)
xend = x + gpct(3, codeDate) xend = x + gpct(3, codeDate)
dy = gpct(5, codeQ, ref=0) dy = gpct(5, codeQ, ref=0)
y = gpct(108, codeQ, ref=0) - (i-1)*dy y = gpct(105, codeQ, ref=0) - (ii-1)*dy
xt = xend + gpct(1, codeDate) xt = xend + gpct(1, codeDate)
label = bquote(bold(.(format(df_trend_code$trend, scientific=TRUE, digits=3)))~'['*m^{3}*'.'*s^{-1}*'.'*an^{-1}*']') label = bquote(bold(.(format(df_trend_code$trend, scientific=TRUE, digits=3)))~'['*m^{3}*'.'*s^{-1}*'.'*an^{-1}*']')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment