X-Git-Url: https://git.auder.net/images/pieces/%22%20%20%20VariantRules.getPpath%28board%5Bi%5D%5Bj%5D%29%20%20%20%22.svg?a=blobdiff_plain;f=R%2Fplot.R;h=fe2fb4e39a2840b9c67208571c0797892260bea1;hb=HEAD;hp=f551ef4263697dd1514130edbc79e516c9bf8c18;hpb=4e95ec8f70fc0c8bc50649cdadb1f47e2bcce117;p=talweg.git diff --git a/R/plot.R b/R/plot.R deleted file mode 100644 index f551ef4..0000000 --- a/R/plot.R +++ /dev/null @@ -1,169 +0,0 @@ -#' @title plot measured / predicted -#' -#' @description Plot measured curve (in black) and predicted curve (in red) -#' -#' @param data Object return by \code{getData} -#' @param pred Object as returned by \code{getForecast} -#' @param index Index in forecasts -#' -#' @export -plotPredReal <- function(data, pred, index) -{ - horizon = length(pred$getSerie(1)) - par(mar=c(4.7,5,1,1), cex.axis=1.5, cex.lab=1.5, lwd=3) - measure = data$getSerie(pred$getIndexInData(index)+1)[1:horizon] - yrange = range( pred$getSerie(index), measure ) - plot(measure, type="l", ylim=yrange, xlab="Temps (en heures)", ylab="PM10") - par(new=TRUE) - plot(pred$getSerie(index), type="l", col="#0000FF", ylim=yrange, xlab="", ylab="") -} - -#' @title Plot filaments -#' -#' @description Plot similar days in the past + "past tomorrow", as black as distances are small -#' -#' @param data Object as returned by \code{getData} -#' @param index Index in data -#' @param limit Number of neighbors to consider -#' -#' @export -plotFilaments <- function(data, index, limit=60) -{ - index = dateIndexToInteger(index, data) - ref_serie = data$getCenteredSerie(index) - if (any(is.na(ref_serie))) - stop("plotFilaments requires a serie without NAs") - L = length(ref_serie) - first_day = ifelse(length(data$getCenteredSerie(1)