-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
featurea feature request or enhancementa feature request or enhancementmessagesrequests for improvements to error, warning, or feedback messagesrequests for improvements to error, warning, or feedback messages
Description
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)
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancementmessagesrequests for improvements to error, warning, or feedback messagesrequests for improvements to error, warning, or feedback messages