Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1061 from bgamari/master

Add log option to Axes.hist2d
  • Loading branch information...
commit f3ccff33e0f5e3b0c6c3d313da87616bca4e621e 2 parents dd9cfa4 + d33877c
@WeatherGod WeatherGod authored
10 examples/pylab_examples/
@@ -0,0 +1,10 @@
+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())
6 lib/matplotlib/
@@ -8223,7 +8223,11 @@ def hist2d(self, x, y, bins = 10, range=None, normed=False, weights=None,
these count values in the return value count histogram
will also be set to nan upon return
- Remaining keyword arguments are passed directly to :meth:pcolorfast
+ Remaining keyword arguments are passed directly to :meth:`pcolorfast`.
+ Rendering the histogram with a logarithmic color scale is
+ accomplished by passing a :class:`colors.LogNorm` instance to
+ the *norm* keyword argument.
Please sign in to comment.
Something went wrong with that request. Please try again.