Skip to content

TST: suppress matplotlib warnings (or determine if they represent a bug) #37178

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

Closed
jbrockmendel opened this issue Oct 16, 2020 · 7 comments
Closed
Labels
Visualization plotting Warnings Warnings that appear or should be added to pandas

Comments

@jbrockmendel
Copy link
Member

There are a bunch of these in the test logs:

pandas/tests/plotting/test_hist_method.py::TestDataFramePlots::test_hist_column_order_unchanged[None-expected0]
pandas/tests/plotting/test_hist_method.py::TestDataFramePlots::test_hist_column_order_unchanged[column1-expected1]
pandas/tests/plotting/test_hist_method.py::TestDataFramePlots::test_hist_with_legend[None-None]
   pandas/tests/plotting/common.py:556: UserWarning: To output multiple subplots, the figure containing the passed axes is being cleared
    ret = f(**kwargs)

Do these represent problems we need to do something about? cc @tacaswell

If not, we should suppress them. My attempts to do so with pytestmark = pytest.mark.filterwarnings have failed, could use another pair of eyeballs.

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member Visualization plotting Warnings Warnings that appear or should be added to pandas and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 16, 2020
@tacaswell
Copy link
Contributor

The warnings are from the pandas side of things:

warnings.warn(
"To output multiple subplots, the figure containing "
"the passed axes is being cleared",
UserWarning,
stacklevel=4,
)

@fangchenli
Copy link
Member

xref #18306

@ivanovmg
Copy link
Member

I fixed similar warnings in #36982
I can look at the remaining ones of this kind.

@jbrockmendel
Copy link
Member Author

@ivanovmg is this closed by #37274?

@ivanovmg
Copy link
Member

@jbrockmendel I think the PR mentioned helps resolve the problem.
However, let me check whether there are still some tests issuing the same warning.
If so, then I will apply the same changes as was already done in the PR.

@ivanovmg
Copy link
Member

I checked on master.
No more warnings of this kind:

UserWarning: To output multiple subplots, the figure containing the passed axes is being cleared

So, probably the issue can be closed.

@jbrockmendel
Copy link
Member Author

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Visualization plotting Warnings Warnings that appear or should be added to pandas
Projects
None yet
Development

No branches or pull requests

4 participants