10000 make seaborn great again on Matplotlib-2.2 by stonebig · Pull Request #10622 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

make seaborn great again on Matplotlib-2.2 #10622

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 5 commits into from
Feb 28, 2018
Merged
Changes from 2 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
2 changes: 1 addition & 1 deletion lib/matplotlib/axes/_subplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def _make_twin_axes(self, *kl, **kwargs):
Make a twinx axes of self. This is used for twinx and twiny.
"""
from matplotlib.projections import process_projection_requirements
if 'sharex' in kwargs and 'sharey' in kwargs:
if kwargs["sharex"] is not self and kwargs["sharey"] is not self:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't the same as the old check at all 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hum, result is identical unless one of the 2 sharex/sharey is "self", isn't it ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be a separate check as well as the one it has replaced right? The currently one checks that both x and y aren't shared at the same time, and you want to check that we're not trying to share an axis with itself.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will also give a KeyError if "sharex" and "sharey" aren't in kwargs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

argh... ok, tuning

raise ValueError("Twinned Axes may share only one axis.")
kl = (self.get_subplotspec(),) + kl
projection_class, kwargs, key = process_projection_requirements(
Expand Down
0