Skip to content

Commit 44200a2

Browse files
teunbrandthomasp85
authored andcommitted
<AsIs> never invokes identity scale (#5597)
* skip AsIs scale type * remove `scale_type.AsIs` method
1 parent 3026fe8 commit 44200a2

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ S3method(print,ggproto_method)
112112
S3method(print,rel)
113113
S3method(print,theme)
114114
S3method(print,uneval)
115-
S3method(scale_type,AsIs)
116115
S3method(scale_type,Date)
117116
S3method(scale_type,POSIXt)
118117
S3method(scale_type,character)

R/scale-type.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ find_scale <- function(aes, x, env = parent.frame()) {
22
# Inf is ambiguous; it can be used either with continuous scales or with
33
# discrete scales, so just skip in the hope that we will have a better guess
44
# with the other layers
5-
if (is.null(x) || (is_atomic(x) && all(is.infinite(x)))) {
5+
if (is.null(x) || (is_atomic(x) && all(is.infinite(x))) || inherits(x, "AsIs")) {
66
return(NULL)
77
}
88

@@ -70,9 +70,6 @@ scale_type.default <- function(x) {
7070
#' @export
7171
scale_type.list <- function(x) "identity"
7272

73-
#' @export
74-
scale_type.AsIs <- function(x) "identity"
75-
7673
#' @export
7774
scale_type.logical <- function(x) "discrete"
7875

0 commit comments

Comments
 (0)