From 7c7f53d7eb0ed95d163a151dee2a1409ae1e5909 Mon Sep 17 00:00:00 2001 From: bhklein Date: Wed, 4 Nov 2015 13:17:36 -0500 Subject: [PATCH] fix algorithm names for BC grid --- share/openbr/plotting/plot_utils.R | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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))) -- libgit2 0.21.4