We're updating the default styles for Matplotlib 2.0

Learn what to expect in the new updates


Previous topic

pylab_examples example code: hist2d_demo.py

Next topic

pylab_examples example code: hist_colormapped.py

This Page

pylab_examples example code: hist2d_log_demo.pyΒΆ

(Source code, png, hires.png, pdf)

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())

Keywords: python, matplotlib, pylab, example, codex (see Search examples)