fix mistake; perfs not as good as expected. Why?
authorBenjamin Auder <benjamin.auder@somewhere>
Tue, 25 Apr 2017 13:35:22 +0000 (15:35 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Tue, 25 Apr 2017 13:35:22 +0000 (15:35 +0200)
pkg/R/plot.R

index 2cfaf36..2b74117 100644 (file)
@@ -83,7 +83,7 @@ plotError <- function(err, cols=seq_along(err))
 plotPredReal <- function(data, pred, index)
 {
        prediction = pred$getForecast(index)
-       measure = data$getSerie( pred$getIndexInData(index) )[length(prediction)]
+       measure = data$getSerie( pred$getIndexInData(index) )[1:length(prediction)]
        yrange = range(measure, prediction)
        par(mar=c(4.7,5,1,1), cex.axis=1.5, cex.lab=1.5, lwd=3)
        plot(measure, type="l", ylim=yrange, xlab="Time (hours)", ylab="PM10")