.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_plot_demo_hexbin.py: `hexbin <.core.hexbin>` demo ---------------------------- `hexbin <.core.hexbin>` can be used like `matplotlib.pyplot.hexbin`. .. rst-class:: sphx-glr-horizontal * .. image:: /gallery/images/sphx_glr_plot_demo_hexbin_001.png :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_demo_hexbin_002.png :class: sphx-glr-multi-img .. code-block:: python 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) .. _sphx_glr_download_gallery_plot_demo_hexbin.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: plot_demo_hexbin.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: plot_demo_hexbin.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_