Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a736720

Browse files
authored
test like before, but allowing seaborn exception
1 parent 2c37e60 commit a736720

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/axes/_subplots.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,9 @@ def _make_twin_axes(self, *kl, **kwargs):
172172
Make a twinx axes of self. This is used for twinx and twiny.
173173
"""
174174
from matplotlib.projections import process_projection_requirements
175-
if kwargs["sharex"] is not self and kwargs["sharey"] is not self:
176-
raise ValueError("Twinned Axes may share only one axis.")
175+
if 'sharex' in kwargs and 'sharey' in kwargs:
176+
if kwargs["sharex"] is not self and kwargs["sharey"] is not self:
177+
raise ValueError("Twinned Axes may share only one axis.")
177178
kl = (self.get_subplotspec(),) + kl
178179
projection_class, kwargs, key = process_projection_requirements(
179180
self.figure, *kl, **kwargs)

0 commit comments

Comments
 (0)