diff --git a/R/plot.OutputsModel.R b/R/plot.OutputsModel.R index cbff3932c970a44c879d26090e8cd85564ea86a4..438b6e9a17bd3f2153e36e8fbdc76b3af7b6b0a2 100644 --- a/R/plot.OutputsModel.R +++ b/R/plot.OutputsModel.R @@ -168,18 +168,15 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = BOOL_TS <- TRUE NameTS <- "hour" plotunit <- "[mm/h]" - } - if (inherits(OutputsModel, "daily")) { + } else if (inherits(OutputsModel, "daily")) { BOOL_TS <- TRUE NameTS <- "day" plotunit <- "[mm/d]" - } - if (inherits(OutputsModel, "monthly")) { + } else if (inherits(OutputsModel, "monthly")) { BOOL_TS <- TRUE NameTS <- "month" plotunit <- "[mm/month]" - } - if (inherits(OutputsModel, "yearly")) { + } else if (inherits(OutputsModel, "yearly")) { BOOL_TS <- TRUE NameTS <- "year" plotunit <- "[mm/y]"