-
Notifications
You must be signed in to change notification settings - Fork 2.1k
geom_hex no longer recognizes ..density.. in 2.1.0 #1608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm also running into this issue; it looks to be related to changes to the file The previous code used to return:
whereas it now calls: I'm not sure what the most elegant fix for this is to allow the previous functionality to remain. |
I really like to have the old functionality back as well. Especially if you work with large samples and you want to plot gradient plots for all observations hexagon binning with |
This commit fixes it: https://github.com/mikebirdgeneau/ggplot2/commit/cf990038ffd66983a1ad2760f51c73049dcf56da I'm not familiar with the reasons behind the change made by Hadley above, so I'm apprehensive to submit a pull request until I understand the implications. I basically just added back these lines when preparing the out$count = as.vector(hb@count)
out$density = as.vector(hb@count / sum(hb@count, na.rm = TRUE)) |
@mikebirdgeneau looks like just an accidental omission. Can you please subset a PR? |
In 2.1.0:
causes error:
But in 2.0.0 (or other older versions), we get (random seeds notwithstanding):
The text was updated successfully, but these errors were encountered: