hexbin demo

hexbin can be used like matplotlib.pyplot.hexbin.

  • ../_images/sphx_glr_plot_demo_hexbin_001.png
  • ../_images/sphx_glr_plot_demo_hexbin_002.png
from matplotlib import pyplot
import numpy

import adaptiveheatmap

pyplot.style.use("ggplot")

x = numpy.exp(numpy.random.randn(100000))
y = numpy.random.randn(100000)
ah = adaptiveheatmap.hexbin(x, y, vmin=1)
# ah.relate_xyzq(0.5, 0.5)  # not supported
ah.figure.suptitle('adaptiveheatmap.hexbin')
ah.ax_main.set_xlim(xmax=30)

pyplot.figure()
pyplot.hexbin(x, y, vmin=1)
pyplot.colorbar()
pyplot.suptitle('pyplot.hexbin')
pyplot.xlim(xmax=30)

pyplot.show()

Total running time of the script: ( 0 minutes 0.343 seconds)

Gallery generated by Sphinx-Gallery