.. _pylab_examples-hist2d_log_demo:

pylab_examples example code: hist2d_log_demo.py
===============================================



.. plot:: /build/tmp/matplotlib-1.4.2/doc/mpl_examples/pylab_examples/hist2d_log_demo.py

::

    from matplotlib.colors import LogNorm
    from pylab import *
    
    #normal distribution center at x=0 and y=5
    x = randn(100000)
    y = randn(100000)+5
    
    hist2d(x, y, bins=40, norm=LogNorm())
    colorbar()
    show()
    

Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)