Skip to content

Commit 6a447ba

Browse files
authored
Don't warn about boxplot orientation when position aesthetics are missing (#6643)
* don't warn about orientation when bigger problems are afoot * catch stray documentation
1 parent 6de07af commit 6a447ba

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

R/stat-boxplot.R

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

man/resolution.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)