diff --git a/examples/pylab_examples/hist2d_log_demo.py b/examples/pylab_examples/hist2d_log_demo.py new file mode 100644 index 000000000000..b1cd09de0554 --- /dev/null +++ b/examples/pylab_examples/hist2d_log_demo.py @@ -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()) +colorbar() +show() diff --git a/lib/matplotlib/axes.py b/lib/matplotlib/axes.py index 01e772c44647..ae35b69998a9 100644 --- a/lib/matplotlib/axes.py +++ b/lib/matplotlib/axes.py @@ -8077,7 +8077,11 @@ def hist2d(self, x, y, bins = 10, range=None, normed=False, weights=None, All bins that has count more than cmax will not be displayed (set to none before passing to imshow) and 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. **Example:** pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy