Issue warning when geom orientation is ambiguous
I'm using the new-ish bidirectional geom support to make boxplots stretching along the x-axis. If I place a continuous aesthetic on the y axis, I believe the warning should instead say Continuous y aesthetic. Since I'm not sure how ggplot2 could know my intentions (i.e. whether I want x or y to be considered as the grouping variable), maybe it would be less confusing if the warning said something along the lines of "One of x or y aesthetic should be discrete or you can use aes(group = ...) to specify the grouping variable." Not sure if that's too wordy, but something along those lines would be an improvement on the current warning.
library(tidyverse)
ggplot(mpg, aes(y = displ, x = cty)) +
geom_boxplot()
#> Warning: Continuous x aesthetic -- did you forget aes(group=...)?

Created on 2020-10-28 by the reprex package (v0.3.0)
I'm not sure I understand exactly what the concern is. The warning seems to follow the orientation of the geom. Do you have a scenario in which the warning is incorrect or confusing?
library(tidyverse)
ggplot(mpg, aes(y = displ, x = cty)) +
geom_boxplot()
#> Warning: Continuous x aesthetic -- did you forget aes(group=...)?

ggplot(mpg, aes(y = displ, x = cty)) +
geom_boxplot(orientation = "y")
#> Warning: Continuous y aesthetic -- did you forget aes(group=...)?

Created on 2020-10-28 by the reprex package (v0.3.0)
Alternatively, I could see issuing a warning when the orientation algorithm is encountering an ambiguous scenario and picks the default: "Warning: Orientation is not uniquely specified when both the x and y aesthetics are continuous. Picking default orientation 'x'."
Right, I think a warning that specifies that default orientation is being picked would be equally helpful.
Ok, I've changed the issue title accordingly.
Is this just the case for geom_boxplot() or are there other examples that are ambiguous as well?
@teunbrand I don't think so.