diff --git a/share/openbr/plotting/plot_utils.R b/share/openbr/plotting/plot_utils.R index 82a7f0c..514f9c3 100644 --- a/share/openbr/plotting/plot_utils.R +++ b/share/openbr/plotting/plot_utils.R @@ -9,7 +9,13 @@ library("grid") # Code to format FAR values far_names <- list('0.001'="FAR = 0.1%", '0.01'="FAR = 1%") -far_labeller <- function(variable,value) { return(far_names[as.character(value)]) } +far_labeller <- function(variable,value) { + if (as.character(value) %in% names(far_names)) { + return(far_names[as.character(value)]) + } else { + return(as.character(value)) + } +} getScale <- function(mode, title, vals) { if (vals > 12) return(do.call(paste("scale", mode, "discrete", sep="_"), list(title)))