-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: Address matplotlib 3.10 deprecation of vert= #60584
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
Conversation
Merging to get a green CI |
…ecation of vert=) (#60586) * Backport PR #60584: TST: Address matplotlib 3.10 deprecation of vert= * Add missing import * Ignore pre-commit check --------- Co-authored-by: Matthew Roeschke <[email protected]>
@pytest.mark.xfail( | ||
Version(mpl.__version__) >= Version("3.10"), | ||
reason="Fails starting with matplotlib 3.10", | ||
) | ||
def test_boxplot_vertical(self, hist_df): | ||
df = hist_df | ||
numeric_cols = df._get_numeric_data().columns | ||
labels = [pprint_thing(c) for c in numeric_cols] | ||
|
||
# if horizontal, yticklabels are rotated | ||
ax = df.plot.box(rot=50, fontsize=8, vert=False) | ||
kwargs = ( | ||
{"vert": False} | ||
if Version(mpl.__version__) < Version("3.10") | ||
else {"orientation": "horizontal"} | ||
) | ||
ax = df.plot.box(rot=50, fontsize=8, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to understand the change: even though using the new keyword for mpl >= 3.10, it is still failing somehow? (given you added the xfail)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's correct. It appears that changing this to use the equivalent, new matplotlib 3.10 keyword causes some tests to fail. I was unable to determine if the failure was on our side or the matplotlib side
Thanks for addressing this! |
* TST: Address matplotlib 3.10 deprecation of vert= * Type in ._version * Address other failures * more test faillures * Add more xfails * mypy error
e.g. https://app.circleci.com/jobs/github/pandas-dev/pandas/243601