library(ggplot2)

Bins in 2D

p <- ggplot(diamonds, aes(carat, price))
p <- p + geom_bin2d(binwidth = c(0.25, 500))
print(p)

Density in 2D

p <- ggplot(diamonds, aes(carat, price))
p <- p + geom_density2d()
print(p)

Hexagons

p <- ggplot(diamonds, aes(carat, price))
p <- p + geom_hex()
print(p)
## Warning: Computation failed in `stat_binhex()`:
##   Package `hexbin` required for `stat_binhex`.
##   Please install and try again.