Skip to content

Commit ef9d417

Browse files
authored
avoid mapping AsIs variables (#6311)
1 parent 5cc4ca7 commit ef9d417

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

R/scale-discrete-.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ ScaleDiscretePosition <- ggproto("ScaleDiscretePosition", ScaleDiscrete,
153153
},
154154

155155
map = function(self, x, limits = self$get_limits()) {
156+
if (inherits(x, "AsIs")) {
157+
return(x)
158+
}
156159
if (is.discrete(x)) {
157160
values <- self$palette(length(limits))
158161
if (!is.numeric(values)) {

0 commit comments

Comments
 (0)