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 d84ed49

Browse filesBrowse files
authored
Merge pull request #15472 from meeseeksmachine/auto-backport-of-pr-15460-on-v2.2.x
Backport PR #15460 on branch v2.2.x (Fix incorrect value check in axes_grid.)
2 parents 4a52521 + 8f4bfa7 commit d84ed49
Copy full SHA for d84ed49

File tree

Expand file treeCollapse file tree

2 files changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-1
lines changed

‎lib/mpl_toolkits/axes_grid1/axes_grid.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axes_grid1/axes_grid.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def __init__(self, fig,
484484
if ngrids is None:
485485
ngrids = self._nrows * self._ncols
486486
else:
487-
if not 0 <= ngrids < self._nrows * self._ncols:
487+
if not 0 < ngrids <= self._nrows * self._ncols:
488488
raise Exception
489489

490490
self.ngrids = ngrids

‎lib/mpl_toolkits/tests/test_axes_grid1.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/tests/test_axes_grid1.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def test_axesgrid_colorbar_log_smoketest():
101101
fig = plt.figure()
102102
grid = AxesGrid(fig, 111, # modified to be only subplot
103103
nrows_ncols=(1, 1),
104+
ngrids=1,
104105
label_mode="L",
105106
cbar_location="top",
106107
cbar_mode="single",

0 commit comments

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