Does anyone know if its possible to map to hexagon size with ggplot? Size is listed as an argument in the geom_hex documentation, but there are no examples of size mapping in stat_hexbin, so this just seems to relate to bin size.
Take for example:
ggplot(economics, aes(x=uempmed, y=unemploy)) + geom_hex()
But looking for instance at population distribution (below) it might be useful to map binned mean population to hexagon size, but I've not found a formula for this (if one exists).
ggplot(economics, aes(x=uempmed, y=unemploy, col=pop)) + geom_point()
Any ideas?
Apparently the official answer is that ggplot does not have functionality to map to hexagon area. But as you can see a workaround solution is possible, now posted in a gist at github.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With