From fe9963de5b24c3b918a034c8a7c1c715b337fcd6 Mon Sep 17 00:00:00 2001 From: dchakro <35454738+dchakro@users.noreply.github.com> Date: Fri, 29 Sep 2023 13:28:47 -0700 Subject: [PATCH] bugfix: Return color for just 1 category. --- returnPalette.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/returnPalette.R b/returnPalette.R index 8e7eb63..02ccc44 100644 --- a/returnPalette.R +++ b/returnPalette.R @@ -25,7 +25,7 @@ returnPalette <- if (class(ColorVariable) == "factor") { colorsNeeded <- length(levels(ColorVariable)) } - if (colorsNeeded < 1) { + if (colorsNeeded <= 1) { myPalette <- c("#DD0000") warning("Nothing to return color for.") }