Skip to content

Instantly share code, notes, and snippets.

@stucchio
Created March 24, 2012 14:58
Show Gist options
  • Save stucchio/2183927 to your computer and use it in GitHub Desktop.
Save stucchio/2183927 to your computer and use it in GitHub Desktop.
Hexbin vs Scatterplot
from numpy import *
from pylab import *
x = rand(N)
y = x + random.normal(0, 0.4, size=(N,))
subplot(211)
axis((0,1,0,1))
scatter(x,y)
subplot(212)
axis((0,1,0,1))
hexbin(x,y, gridsize=50, bins=50)
show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment