We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa1c538 commit 0efe198Copy full SHA for 0efe198
lib/matplotlib/gridspec.py
@@ -599,7 +599,10 @@ def _from_subplot_args(figure, args):
599
)
600
i, j = num
601
else:
602
- if not isinstance(num, Integral) or num < 1 or num > rows*cols:
+ if not isinstance(num, Integral):
603
+ raise ValueError(
604
+ f"Subplot specifier must be an integer, not {num!r}")
605
+ if num < 1 or num > rows*cols:
606
raise ValueError(
607
f"num must be 1 <= num <= {rows*cols}, not {num!r}")
608
i = j = num
0 commit comments