Skip to content

Commit fd4b3c4

Browse files
committed
Remove deprecated subplot 0
1 parent b74145f commit fd4b3c4

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/matplotlib/axes/_subplots.py

+2-7
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)