diff --git a/R/PlotForecastPDF.R b/R/PlotForecastPDF.R index 5cb90c16ce4ebbc11dbb3f81738588746421d284..2134d808c9f8da6543be6d9e19cb87d2654b623f 100644 --- a/R/PlotForecastPDF.R +++ b/R/PlotForecastPDF.R @@ -37,9 +37,9 @@ #'@param add.ensmemb Either to add the ensemble members \code{'above'} (default) #' or \code{'below'} the pdf, or not (\code{'no'}). #'@param color.set A selection of predefined color sets: use \code{'ggplot'} -#' (default) for blue/green/red, \code{'s2s4e'} for blue/grey/orange, or +#' (default) for blue/green/red, \code{'s2s4e'} for blue/grey/orange, #' \code{'hydro'} for yellow/gray/blue (suitable for precipitation and -#' inflows). +#' inflows) or the \code{"vitigeoss"} color set. #'@param memb_dim A character string indicating the name of the member #' dimension. #' @@ -66,7 +66,8 @@ PlotForecastPDF <- function(fcst, tercile.limits, extreme.limits = NULL, obs = NULL, plotfile = NULL, title = "Set a title", var.name = "Varname (units)", fcst.names = NULL, add.ensmemb = c("above", "below", "no"), - color.set = c("ggplot", "s2s4e", "hydro"), memb_dim = 'member') { + color.set = c("ggplot", "s2s4e", "hydro", "vitigeoss"), + memb_dim = 'member') { value <- init <- extremes <- x <- ymin <- ymax <- tercile <- NULL y <- xend <- yend <- yjitter <- MLT <- lab.pos <- NULL ggColorHue <- function(n) { @@ -95,6 +96,12 @@ PlotForecastPDF <- function(fcst, tercile.limits, extreme.limits = NULL, obs = N colorMember <- c("#ffff7f") colorObs <- "purple" colorLab <- c("red", "blue") + } else if (color.set == "vitigeoss") { + colorFill <- rev(c("#007be2", "#acb2b5", "#f40000")) + colorHatch <- rev(c("#211b79", "#ae0003")) + colorMember <- c("#ffff7f") + colorObs <- "purple" + colorLab <- colorHatch } else { stop("Parameter 'color.set' should be one of ggplot/s2s4e/hydro") } @@ -574,3 +581,4 @@ PlotForecastPDF <- function(fcst, tercile.limits, extreme.limits = NULL, obs = N } return(do.call("rbind", hatch.ls)) } + diff --git a/man/PlotForecastPDF.Rd b/man/PlotForecastPDF.Rd index c6442bbbc1aae7a3458d45db409cbea9d72fb9ee..b76d775b04efe5ef5c432c3f9fca6853e47e323f 100644 --- a/man/PlotForecastPDF.Rd +++ b/man/PlotForecastPDF.Rd @@ -14,7 +14,7 @@ PlotForecastPDF( var.name = "Varname (units)", fcst.names = NULL, add.ensmemb = c("above", "below", "no"), - color.set = c("ggplot", "s2s4e", "hydro"), + color.set = c("ggplot", "s2s4e", "hydro", "vitigeoss"), memb_dim = "member" ) } @@ -55,9 +55,9 @@ individual forecast.} or \code{'below'} the pdf, or not (\code{'no'}).} \item{color.set}{A selection of predefined color sets: use \code{'ggplot'} -(default) for blue/green/red, \code{'s2s4e'} for blue/grey/orange, or +(default) for blue/green/red, \code{'s2s4e'} for blue/grey/orange, \code{'hydro'} for yellow/gray/blue (suitable for precipitation and -inflows).} +inflows) or the \code{"vitigeoss"} color set.} \item{memb_dim}{A character string indicating the name of the member dimension.}