Skip to content

Commit b6a3db2

Browse files
committed
Merge pull request #3721 from jenshnielsen/subplots-deprecation
MNT : Subplots deprecation
2 parents b74145f + 62e2a2a commit b6a3db2

File tree

3 files changed

+348
-325
lines changed

3 files changed

+348
-325
lines changed

lib/matplotlib/axes/_subplots.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,10 @@ def __init__(self, fig, *args, **kwargs):
5858
num = [int(n) for n in num]
5959
self._subplotspec = GridSpec(rows, cols)[num[0] - 1:num[1]]
6060
else:
61-
if num < 0 or num > rows*cols:
61+
if num < 1 or num > rows*cols:
6262
raise ValueError(
63-
"num must be 0 <= num <= {maxn}, not {num}".format(
63+
"num must be 1 <= num <= {maxn}, not {num}".format(
6464
maxn=rows*cols, num=num))
65-
if num == 0:
66-
warnings.warn("The use of 0 (which ends up being the "
67-
"_last_ sub-plot) is deprecated in 1.4 "
68-
"and will raise an error in 1.5",
69-
mplDeprecation)
7065
self._subplotspec = GridSpec(rows, cols)[int(num) - 1]
7166
# num - 1 for converting from MATLAB to python indexing
7267
else:

0 commit comments

Comments
 (0)