Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 37de055

Browse files
committed
MNT: hist2d use pcolormesh instead of pcolorfast
1 parent abe0e39 commit 37de055

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
`~.hist2d` now uses `~.pcolormesh` instead of `~.pcolorfast`
2+
------------------------------------------------------------
3+
4+
`~.hist2d` now uses `~.pcolormesh` instead of `~.pcolorfast`,
5+
which will improve the handling of log-axes. Note that the
6+
returned *image* now is of type `~.matplotlib.collections.QuadMesh`
7+
instead of ``~.matplotlib.image.AxesImage`.

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6505,7 +6505,7 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None,
65056505
The bin edges along the x axis.
65066506
yedges : 1D array
65076507
The bin edges along the y axis.
6508-
image : AxesImage
6508+
image : `~.matplotlib.collections.QuadMesh`
65096509
65106510
Other Parameters
65116511
----------------
@@ -6545,7 +6545,7 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None,
65456545
if cmax is not None:
65466546
h[h > cmax] = None
65476547

6548-
pc = self.pcolorfast(xedges, yedges, h.T, **kwargs)
6548+
pc = self.pcolormesh(xedges, yedges, h.T, **kwargs)
65496549
self.set_xlim(xedges[0], xedges[-1])
65506550
self.set_ylim(yedges[0], yedges[-1])
65516551

0 commit comments

Comments
 (0)