Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<AsIs> never invokes identity scale #5597

Merged
merged 2 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 1 addition & 4 deletions R/scale-type.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down Expand Up @@ -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"

Expand Down
Loading