X-Git-Url: https://git.auder.net/?p=talweg.git;a=blobdiff_plain;f=pkg%2FR%2Fplot.R;h=2cfaf360be0b95a46fad894b8a242073d897eb98;hp=ad0ed4ea7e5ac0999d270a10c1dd8ea61d0b7753;hb=3fd7377d1a3c33eb45803e43aab4e47b1c9f03f8;hpb=cf3bb00128ac8cb930996455faf7c99a3fc102fb diff --git a/pkg/R/plot.R b/pkg/R/plot.R index ad0ed4e..2cfaf36 100644 --- a/pkg/R/plot.R +++ b/pkg/R/plot.R @@ -208,8 +208,9 @@ plotFilamentsBox = function(data, fil, predict_from) stop("Functional boxplot requires the rainbow package") series_matrix = rbind( - data$getSeries(fil$neighb_indices), data$getSeries(fil$neighb_indices+1) ) + data$getSeries(fil$neighb_indices-1), data$getSeries(fil$neighb_indices) ) series_fds = rainbow::fds(seq_len(nrow(series_matrix)), series_matrix) + par(mar=c(4.7,5,1,1), cex.axis=1.5, cex.lab=1.5) rainbow::fboxplot(series_fds, "functional", "hdr", xlab="Time (hours)", ylab="PM10", plotlegend=FALSE, lwd=2) @@ -234,8 +235,8 @@ plotFilamentsBox = function(data, fil, predict_from) #' @export plotRelVar = function(data, fil, predict_from) { - ref_var = c( apply(data$getSeries(fil$neighb_indices),1,sd), - apply(data$getSeries(fil$neighb_indices+1),1,sd) ) + ref_var = c( apply(data$getSeries(fil$neighb_indices-1),1,sd), + apply(data$getSeries(fil$neighb_indices),1,sd) ) tdays = .getNoNA2(data, 2, fil$index) global_var = c( apply(data$getSeries(tdays-1),1,sd),