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
Improve hexbin() documentation #20397
Conversation
timhoffm
commented
Jun 9, 2021
- See-also-link between hexbin() and hist2d()
- More compact example code notation
- Better example Introduction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but a couple of small comments!
examples/statistics/hexbin_demo.py
Outdated
Hexagonal bins have less sampling bias from edge effects than rectangular | ||
bins and can thus be a more correct representation of the data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hexagonal bins have less sampling bias from edge effects than rectangular | |
bins and can thus be a more correct representation of the data. | |
For some data distributions, hexagonal bins may have less sampling bias from edge effects than rectangular bins. |
... though I'd just not say this at all, unless you have a citation to say that hexagonal bins are "more correct"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hexagons are the maximum number of sides a polygon can havefor a regular tesselation of the plane, so in terms of packing a hexagon is 13%more efficient for covering the plane than squares. This property translates intobetter sampling efficiency at least for elliptical shapes. Lastly hexagons are vi-sually less biased for displaying densities than other regular tesselations. Forinstance with squares our eyes are drawn to the horizontal and vertical lines ofthe grid.
https://cran.r-project.org/web/packages/hexbin/vignettes/hexagon_binning.pdf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree for the example shown there, where the size of the bin is proportional to the density in the bin. Less convinced that it is true for a normal hex bin plot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
ba4a3ec
to
9361a71
Compare
- See-also-link between hexbin() and hist2d() - More compact example code notation - Better example Introduction Co-authored-by: Jody Klymak <jklymak@gmail.com>