-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behaviorlayers 📈messagesrequests for improvements to error, warning, or feedback messagesrequests for improvements to error, warning, or feedback messages
Description
The discussion in #1967 indicates geom_bin2d() has supported a weight aesthetic since at least 2017 (though it continues to be undocumented). However, when I include weight = <column>
in aes()
a warning is emitted saying weight is ignored. Even though it's actually getting used (the difference between weighted and unweighted is obvious in my dataset as well as when removing the weight aesthetic from the repex below).
# this gives a plot with count = weight as expected but...
data = tibble(x = seq(-5, 5), y = seq(-5, 5), weight = seq(1, 11))
ggplot(data) + geom_bin2d(aes(x = x, y = y, fill = ..density.., weight = weight))
# also says
# Warning message:
# Ignoring unknown aesthetics: weight
A workaround to avoid this warning is given in this StackOverflow question but, as I've several million observations in my data with a fairly wide range of weights, it's more practical just to ignore the warning.
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behaviorlayers 📈messagesrequests for improvements to error, warning, or feedback messagesrequests for improvements to error, warning, or feedback messages