From 975d14b796457efb69e3c0b64310e2f9629714e4 Mon Sep 17 00:00:00 2001 From: mtennekes Date: Fri, 9 Feb 2024 08:42:25 +0100 Subject: [PATCH] fixed #832 --- R/tmapGrid_layers.R | 4 ++-- R/tmapScale_.R | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/tmapGrid_layers.R b/R/tmapGrid_layers.R index e77250cf..bc85880a 100644 --- a/R/tmapGrid_layers.R +++ b/R/tmapGrid_layers.R @@ -267,8 +267,8 @@ tmapGridRaster <- function(shpTM, dt, gp, bbx, facet_row, facet_col, facet_page, sel = which(tmapID %in% tid) tid2 = tmapID[sel] - - color[sel] = dt$col[match(tid2, dt$tmapID__)] + dt = merge_alpha(dt, name = "col") + color[sel] = dt$ca[match(tid2, dt$tmapID__)] } diff --git a/R/tmapScale_.R b/R/tmapScale_.R index 9bc138ed..5b94645a 100644 --- a/R/tmapScale_.R +++ b/R/tmapScale_.R @@ -148,10 +148,10 @@ tmapScaleAuto = function(x1, scale, legend, o, aes, layer, layer_args, sortRev, } else if (attr(cls, "unique")) { if ("num" %in% cls) { sc = "ordinal" - message("The visual variable \"", aes, "\" of the layer, \", layer", "\" contains a unique value. Therefore a discrete scale is applied (tm_scale_discrete).") + message("The visual variable \"", aes, "\" of the layer \"", layer, "\" contains a unique value. Therefore a discrete scale is applied (tm_scale_discrete).") } else { sc = "categorical" - message("The visual variable \"", aes, "\" of the layer, \", layer", "\" contains a unique value. Therefore a categorical scale is applied (tm_scale_categorical).") + message("The visual variable \"", aes, "\" of the layer \"", layer, "\" contains a unique value. Therefore a categorical scale is applied (tm_scale_categorical).") }