Skip to content

Commit d2e68ff

Browse files
authored
Merge pull request #10622 from stonebig/patch-1
make seaborn great again on Matplotlib-2.2
2 parents 6bb5994 + 09a17f4 commit d2e68ff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/axes/_subplots.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ def _make_twin_axes(self, *kl, **kwargs):
173173
"""
174174
from matplotlib.projections import process_projection_requirements
175175
if 'sharex' in kwargs and 'sharey' in kwargs:
176-
raise ValueError("Twinned Axes may share only one axis.")
176+
# The following line is added in v2.2 to avoid breaking Seaborn,
177+
# which currently uses this internal API.
178+
if kwargs["sharex"] is not self and kwargs["sharey"] is not self:
179+
raise ValueError("Twinned Axes may share only one axis.")
177180
kl = (self.get_subplotspec(),) + kl
178181
projection_class, kwargs, key = process_projection_requirements(
179182
self.figure, *kl, **kwargs)

0 commit comments

Comments
 (0)