library(hexbin)
x <- rnorm(mean=1.5, 5000)
y <- rnorm(mean=1.6, 5000)
bin<-hexbin(x, y)
plot(bin@xcm, bin@ycm, pch=20)
I want to get the center coordinate of each hex in a hexbin plot. But xcm and ycm are not the centers of the hexagons as shown in the above example.
How to get the center coordinate of the hexagon? Two solutions are needed one for hexbin package, one for ggplot2.



