Skip to content

Commit 6bbfe29

Browse files
committed
1 parent 2114cc9 commit 6bbfe29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/tmapScaleContinuous.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ tmapScaleContinuous = function(x1, scale, legend, chart, o, aes, layer, layer_ar
3131
cls = data_class(x1, midpoint_enabled = !is.null(scale$midpoint))
3232
maincls = class(scale)[1]
3333

34-
if (attr(cls, "unique") && is.na(scale$limits) && is.null(scale$ticks)) {
34+
if (attr(cls, "unique") && any(is.na(scale$limits)) && is.null(scale$ticks)) {
3535
scale$ticks = NA
3636
cli::cli_inform("The visual variable {.arg {aes}} of the layer {.str {layer}} contains a unique value. Therefore a discrete scale is applied (tm_scale_discrete).")
3737
return(tmapScaleDiscrete(x1, scale, legend, chart, o, aes, layer, layer_args, sortRev, bypass_ord, submit_legend = submit_legend))

0 commit comments

Comments
 (0)