diff --git a/lib/matplotlib/axes/_subplots.py b/lib/matplotlib/axes/_subplots.py
index 1f6348a32dff..d08f0f38b12d 100644
--- a/lib/matplotlib/axes/_subplots.py
+++ b/lib/matplotlib/axes/_subplots.py
@@ -58,15 +58,10 @@ def __init__(self, fig, *args, **kwargs):
num = [int(n) for n in num]
self._subplotspec = GridSpec(rows, cols)[num[0] - 1:num[1]]
else:
- if num < 0 or num > rows*cols:
+ if num < 1 or num > rows*cols:
raise ValueError(
- "num must be 0 <= num <= {maxn}, not {num}".format(
+ "num must be 1 <= num <= {maxn}, not {num}".format(
maxn=rows*cols, num=num))
- if num == 0:
- warnings.warn("The use of 0 (which ends up being the "
- "_last_ sub-plot) is deprecated in 1.4 "
- "and will raise an error in 1.5",
- mplDeprecation)
self._subplotspec = GridSpec(rows, cols)[int(num) - 1]
# num - 1 for converting from MATLAB to python indexing
else:
diff --git a/lib/matplotlib/tests/baseline_images/test_path/path_clipping.svg b/lib/matplotlib/tests/baseline_images/test_path/path_clipping.svg
index 110e933f65f7..bd86170b41c6 100644
--- a/lib/matplotlib/tests/baseline_images/test_path/path_clipping.svg
+++ b/lib/matplotlib/tests/baseline_images/test_path/path_clipping.svg
@@ -21,40 +21,44 @@ z
-
+
+M54 44.64
+L206.182 44.64
+L206.182 44.64" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M206.182 122.275
+L206.182 44.64
+L206.182 44.64" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M54 122.275
+L206.182 122.275
+L206.182 122.275" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M54 122.275
+L54 44.64
+L54 44.64" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
@@ -62,92 +66,92 @@ L236.618 324.125" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-l
+L0 -4" id="mb1445623b5" style="stroke:#000000;stroke-width:0.5;"/>
-
+
+L0 4" id="m3a68111ca7" style="stroke:#000000;stroke-width:0.5;"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -158,80 +162,80 @@ L0 4" id="m741efc42ff" style="stroke:#000000;stroke-width:0.5;"/>
+L4 0" id="m71e820122c" style="stroke:#000000;stroke-width:0.5;"/>
-
+
+L-4 0" id="m81ec2b1422" style="stroke:#000000;stroke-width:0.5;"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -240,123 +244,127 @@ L-4 0" id="mcb0005524f" style="stroke:#000000;stroke-width:0.5;"/>
-
+
+M236.618 44.64
+L388.8 44.64
+L388.8 44.64" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M388.8 122.275
+L388.8 44.64
+L388.8 44.64" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M236.618 122.275
+L388.8 122.275
+L388.8 122.275" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M236.618 122.275
+L236.618 44.64
+L236.618 44.64" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -365,72 +373,72 @@ L54 44.64" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -439,123 +447,127 @@ L54 44.64" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin
-
+
+M54 137.802
+L206.182 137.802
+L206.182 137.802" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M206.182 215.437
+L206.182 137.802
+L206.182 137.802" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M54 215.437
+L206.182 215.437
+L206.182 215.437" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M54 215.437
+L54 137.802
+L54 137.802" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -564,72 +576,72 @@ L236.618 44.64" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-lin
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -638,123 +650,127 @@ L236.618 44.64" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-lin
-
+
+M236.618 137.802
+L388.8 137.802
+L388.8 137.802" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M388.8 215.437
+L388.8 137.802
+L388.8 137.802" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M236.618 215.437
+L388.8 215.437
+L388.8 215.437" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M236.618 215.437
+L236.618 137.802
+L236.618 137.802" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -763,72 +779,72 @@ L54 137.802" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejo
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -837,123 +853,127 @@ L54 137.802" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejo
-
+
+M54 230.963
+L206.182 230.963
+L206.182 230.963" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M206.182 308.598
+L206.182 230.963
+L206.182 230.963" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M54 308.598
+L206.182 308.598
+L206.182 308.598" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M54 308.598
+L54 230.963
+L54 230.963" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -962,72 +982,72 @@ L236.618 137.802" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-l
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1036,123 +1056,127 @@ L236.618 137.802" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-l
-
+
+M236.618 230.963
+L388.8 230.963
+L388.8 230.963" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M388.8 308.598
+L388.8 230.963
+L388.8 230.963" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M236.618 308.598
+L388.8 308.598
+L388.8 308.598" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M236.618 308.598
+L236.618 230.963
+L236.618 230.963" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1161,72 +1185,72 @@ L54 230.963" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejo
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1235,123 +1259,127 @@ L54 230.963" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejo
-
+
+M54 324.125
+L206.182 324.125
+L206.182 324.125" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M206.182 401.76
+L206.182 324.125
+L206.182 324.125" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M54 401.76
+L206.182 401.76
+L206.182 401.76" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
+M54 401.76
+L54 324.125
+L54 324.125" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1360,72 +1388,72 @@ L236.618 230.963" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-l
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1439,20 +1467,20 @@ L236.618 230.963" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-l
-
-
-
+
+
+
-
-
+
+
diff --git a/lib/matplotlib/tests/test_path.py b/lib/matplotlib/tests/test_path.py
index 8250e37b9f88..4590dfb51aa0 100644
--- a/lib/matplotlib/tests/test_path.py
+++ b/lib/matplotlib/tests/test_path.py
@@ -53,7 +53,7 @@ def test_path_clipping():
[(200, 100), (200, 415), (400, 415), (400, 100)],
[(200, 415), (400, 415), (400, 100), (200, 100)],
[(400, 415), (400, 100), (200, 100), (200, 415)]]):
- ax = fig.add_subplot(4, 2, i)
+ ax = fig.add_subplot(4, 2, i+1)
bbox = [0, 140, 640, 260]
ax.set_xlim(bbox[0], bbox[0] + bbox[2])
ax.set_ylim(bbox[1], bbox[1] + bbox[3])