Skip to content

Commit

Permalink
Only apply axis sharing if axis is visible
Browse files Browse the repository at this point in the history
  • Loading branch information
lukelbd committed Sep 27, 2021
1 parent 7a7852f commit c6db292
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proplot/axes/cartesian.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def _apply_axis_sharing(self):
# bottommost or to the *right* of the leftmost panel. But the sharing level
# used for the leftmost and bottommost is the *figure* sharing level.
axis = self.xaxis
if self._sharex is not None:
if self._sharex is not None and axis.get_visible():
level = 3 if self._panel_sharex_group else self.figure._sharex
if level > 0:
text._transfer_text(axis.label, self._sharex.xaxis.label)
Expand All @@ -329,7 +329,7 @@ def _apply_axis_sharing(self):
axis.set_tick_params(which='both', labelbottom=False, labeltop=False)
# Y axis
axis = self.yaxis
if self._sharey is not None:
if self._sharey is not None and axis.get_visible():
level = 3 if self._panel_sharey_group else self.figure._sharey
if level > 0:
text._transfer_text(axis.label, self._sharey.yaxis.label)
Expand Down

0 comments on commit c6db292

Please sign in to comment.