From d1693cfc5bd0783fa4ae51c822cf04626d04899c Mon Sep 17 00:00:00 2001 From: aho Date: Thu, 3 Aug 2023 14:02:29 +0200 Subject: [PATCH] check only when var_limits not NULL --- R/ColorBar.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/ColorBar.R b/R/ColorBar.R index 286b115..b6da2bb 100644 --- a/R/ColorBar.R +++ b/R/ColorBar.R @@ -288,7 +288,7 @@ ColorBar <- function(brks = NULL, cols = NULL, vertical = TRUE, triangle_ends <- triangle_ends } } - if (plot) { + if (plot && !is.null(var_limits)) { if ((bar_limits[1] >= var_limits[1]) && !triangle_ends[1]) { .warning("There are variable values smaller or equal to the lower limit ", "of the colour bar and the lower triangle end has been ", -- GitLab