diff --git a/NAMESPACE b/NAMESPACE index 967573b174..176d9e79af 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -112,7 +112,6 @@ S3method(print,ggproto_method) S3method(print,rel) S3method(print,theme) S3method(print,uneval) -S3method(scale_type,AsIs) S3method(scale_type,Date) S3method(scale_type,POSIXt) S3method(scale_type,character) diff --git a/R/scale-type.R b/R/scale-type.R index 2feaa69c82..e9f3b8cc9b 100644 --- a/R/scale-type.R +++ b/R/scale-type.R @@ -2,7 +2,7 @@ find_scale <- function(aes, x, env = parent.frame()) { # Inf is ambiguous; it can be used either with continuous scales or with # discrete scales, so just skip in the hope that we will have a better guess # with the other layers - if (is.null(x) || (is_atomic(x) && all(is.infinite(x)))) { + if (is.null(x) || (is_atomic(x) && all(is.infinite(x))) || inherits(x, "AsIs")) { return(NULL) } @@ -70,9 +70,6 @@ scale_type.default <- function(x) { #' @export scale_type.list <- function(x) "identity" -#' @export -scale_type.AsIs <- function(x) "identity" - #' @export scale_type.logical <- function(x) "discrete"