diff --git a/R/plot.OutputsModel.R b/R/plot.OutputsModel.R index 139db9c66a3518dbda6c9659506721a009d5ce8e..a5516cc70e0e4911a1e07bb47d0e931dfb668790 100644 --- a/R/plot.OutputsModel.R +++ b/R/plot.OutputsModel.R @@ -19,10 +19,11 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = ## index time series if (!is.null(IndPeriod_Plot)) { - if (length(IndPeriod_Plot) == 0) { + if (length(IndPeriod_Plot) == 0 || any(IndPeriod_Plot <= 0)) { IndPeriod_Plot <- seq_along(OutputsModel$DatesR) + warning('IndPeriod_Plot') } - IndPeriod_Plot <- seq_along(IndPeriod_Plot) + # IndPeriod_Plot <- seq_along(IndPeriod_Plot) OutputsModel <- .IndexOutputsModel(OutputsModel, IndPeriod_Plot) Qobs <- Qobs[IndPeriod_Plot] } else {