Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Correct regex in filterwarnings #5735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 23, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Change error message to reflect the name of the method
  • Loading branch information
jenshnielsen committed Dec 23, 2015
commit 6979fe5f14fca11960223eaec1f66b7b8e2944ac
4 changes: 2 additions & 2 deletions 4 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
2 changes: 1 addition & 1 deletion 2 lib/matplotlib/tests/test_subplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def test_exceptions():
# the pount of this test is to ensure that this raises.
with warnings.catch_warnings():
warnings.filterwarnings('ignore',
message='.*sharex\ argument\ to\ add_subplots',
message='.*sharex\ argument\ to\ subplots',
category=UserWarning)
assert_raises(ValueError, plt.subplots, 2, 2, -1)
assert_raises(ValueError, plt.subplots, 2, 2, 0)
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.