X-Git-Url: https://git.auder.net/?p=talweg.git;a=blobdiff_plain;f=pkg%2FR%2Fplot.R;h=2ef9074aedbe1b7115dc8958d15aa93d1b67623d;hp=95dc0f77abf6aba1a925ae409a99152b47a31d6f;hb=a5a3a294279ad55df6241426be8bcf9546aa402b;hpb=98e958cab563866f8e00886b54336018a2e8bc97 diff --git a/pkg/R/plot.R b/pkg/R/plot.R index 95dc0f7..2ef9074 100644 --- a/pkg/R/plot.R +++ b/pkg/R/plot.R @@ -9,7 +9,7 @@ plotCurves <- function(data, indices=seq_len(data$getSize())) { series = data$getSeries(indices) - yrange = quantile(series, probs=c(0.05,0.95), na.rm=TRUE) + yrange = quantile(series, probs=c(0.025,0.975), na.rm=TRUE) par(mar=c(4.7,5,1,1), cex.axis=1.5, cex.lab=1.5) for (i in seq_along(indices)) { @@ -182,7 +182,7 @@ computeFilaments <- function(data, index, limit=60, plot=TRUE) # Complete series with (past and present) tomorrows ref_serie = c(ref_serie,data$getCenteredSerie(index+1)) centered_series = rbind( centered_series, data$getCenteredSeries(fdays+1) ) - yrange = quantile(cbind(ref_serie,centered_series), probs=c(0.05,0.95), na.rm=TRUE) + yrange = quantile(cbind(ref_serie,centered_series), probs=c(0.025,0.975), na.rm=TRUE) par(mar=c(4.7,5,1,1), cex.axis=1.5, cex.lab=1.5, lwd=2) for (i in nn:1) { @@ -222,7 +222,7 @@ plotFilamentsBox = function(data, fil, ...) usr <- par("usr") yr <- (usr[4] - usr[3]) / 27 par(new=TRUE) - plot(data$getSerie(fil$index), type="l", lwd=2, lty=2, + plot(c(data$getSerie(fil$index),data$getSerie(fil$index+1)), type="l", lwd=2, lty=2, ylim=c(usr[3] + yr, usr[4] - yr), xlab="", ylab="") }