From a59020f07cd039ad7ff605bb8524374a2e457eab Mon Sep 17 00:00:00 2001 From: edzer Date: Tue, 19 Nov 2024 09:45:10 +0100 Subject: [PATCH] fix key.lab for facet plots --- R/plot.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/plot.R b/R/plot.R index 6803786f..717b7258 100644 --- a/R/plot.R +++ b/R/plot.R @@ -87,7 +87,7 @@ kw_dflt = function(x, key.pos) { plot.stars = function(x, y, ..., join_zlim = TRUE, main = make_label(x, 1), axes = FALSE, downsample = TRUE, nbreaks = 11, breaks = "quantile", col = grey(1:(nbreaks-1)/nbreaks), key.pos = get_key_pos(x, ...), key.width = kw_dflt(x, key.pos), key.length = 0.618, - key.lab = main, reset = TRUE, box_col = NA, center_time = FALSE, hook = NULL, + key.lab = ifelse(length(main) == 1, main, ""), reset = TRUE, box_col = NA, center_time = FALSE, hook = NULL, mfrow = NULL, compact = TRUE) { if (!missing(y))