Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,8 +1097,8 @@ def subplots(self, nrows=1, ncols=1, sharex=False, sharey=False,
# instead treated as a bool for sharex.
if isinstance(sharex, int):
warnings.warn(
"sharex argument to add_subplots() was an integer. "
"Did you intend to use add_subplot() (without 's')?")
"sharex argument to subplots() was an integer. "
"Did you intend to use subplot() (without 's')?")

raise ValueError("sharex [%s] must be one of %s" %
(sharex, share_values))
Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/tests/test_subplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ def test_exceptions():
message='.*sharex\ argument\ to\ subplots',
category=UserWarning)
assert_raises(ValueError, plt.subplots, 2, 2, -1)
# uncomment this for 1.5
# assert_raises(ValueError, plt.subplots, 2, 2, 0)
assert_raises(ValueError, plt.subplots, 2, 2, 0)
assert_raises(ValueError, plt.subplots, 2, 2, 5)


Expand Down