From a77c34044ab72e2f3859b3b110d573d9180079d3 Mon Sep 17 00:00:00 2001 From: Jenny Drnevich Date: Wed, 18 Oct 2017 09:28:29 -0500 Subject: [PATCH] fixed bug to pass key.title when only color key You could change the key.title when doing a histogram or density plot on the color key, but not when only doing the color key. I used the same code as the other two situations to allow passing of the key.title argument --- R/heatmap.2.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/heatmap.2.R b/R/heatmap.2.R index a21d01d..187c27d 100644 --- a/R/heatmap.2.R +++ b/R/heatmap.2.R @@ -748,7 +748,9 @@ heatmap.2 <- function (x, } else if (is.null(key.title)) - title("Color Key") + key.title <- "Color Key" + if (!is.na(key.title)) + title(key.title) if(trace %in% c("both","column") ) {