Skip to content

Commit

Permalink
Fix non-cartesian interior labels
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaskom committed Jul 17, 2021
1 parent 3c07f98 commit 38f2efa
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions seaborn/_core/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,13 +472,12 @@ def _setup_figure(self, pyplot: bool = False) -> None:
})

axis_obj = getattr(ax, f"{axis}axis")
if self._subplotspec.get("cartesian", True):
label_side = {"x": "bottom", "y": "left"}.get(axis)
visible = sub[label_side]
axis_obj.get_label().set_visible(visible)
# TODO check that this is the right way to set these attributes
plt.setp(axis_obj.get_majorticklabels(), visible=visible)
plt.setp(axis_obj.get_minorticklabels(), visible=visible)
side = {"x": "bottom", "y": "left"}.get(axis)
visibility = sub[side] or not self._pairspec.get("cartesian", True)
axis_obj.get_label().set_visible(visibility)
# TODO check that this is the right way to set these attributes
plt.setp(axis_obj.get_majorticklabels(), visible=visibility)
plt.setp(axis_obj.get_minorticklabels(), visible=visibility)

# TODO title template should be configurable
# TODO Also we want right-side titles for row facets in most cases
Expand Down

0 comments on commit 38f2efa

Please sign in to comment.