Skip to content

Commit fd74bb5

Browse files
committed
don't warn about orientation when bigger problems are afoot
1 parent af6f4e8 commit fd74bb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/stat-boxplot.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ StatBoxplot <- ggproto("StatBoxplot", Stat,
2525
group_has_equal = TRUE,
2626
main_is_optional = TRUE,
2727
default = NA)
28-
29-
if (is.na(params$flipped_aes)) {
28+
29+
if (is.na(params$flipped_aes) && any(c("x", "y") %in% names(data))) {
3030
cli::cli_warn("Orientation is not uniquely specified when both the x and y aesthetics are continuous. Picking default orientation 'x'.")
3131
params$flipped_aes <- FALSE
3232
}

0 commit comments

Comments
 (0)