Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b206b0c

Browse filesBrowse files
authored
Merge pull request #9542 from matplotlib/auto-backport-of-pr-9442
Backport PR #9442 on branch v2.1.x
2 parents 10ef9e1 + 7dd34d7 commit b206b0c
Copy full SHA for b206b0c

File tree

Expand file treeCollapse file tree

2 files changed

+7
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-0
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5848,6 +5848,7 @@ def pcolorfast(self, *args, **kwargs):
58485848
norm=norm,
58495849
alpha=alpha,
58505850
**kwargs)
5851+
im.set_extent((xl, xr, yb, yt))
58515852
self.add_image(im)
58525853
ret = im
58535854

‎lib/matplotlib/tests/test_image.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_image.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,12 @@ def test_pcolorimage_setdata():
561561
assert im._A[0, 0] == im._Ax[0] == im._Ay[0] == 0, 'value changed'
562562

563563

564+
def test_pcolorimage_extent():
565+
im = plt.hist2d([1, 2, 3], [3, 5, 6],
566+
bins=[[0, 3, 7], [1, 2, 3]])[-1]
567+
assert im.get_extent() == (0, 7, 1, 3)
568+
569+
564570
def test_minimized_rasterized():
565571
# This ensures that the rasterized content in the colorbars is
566572
# only as thick as the colorbar, and doesn't extend to other parts

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.