seaborn icon indicating copy to clipboard operation
seaborn copied to clipboard

Axis / tick labels (control) on internal subplot axes need improvement

Open mwaskom opened this issue 3 years ago • 1 comments

When axes are shared, "internal" axes have axis and tick labels hidden. This is a good default, but might not always be what you want. It should be configurable somehow (perhaps in Plot.layout?)

Additionally, the default is not idea with a "wrapped" figure where the axis is "internal" but all of the axes external to it have been removed. e.g.

(
    so.Plot(mpg, x="mpg")
    .pair(y=["displacement", "weight", "acceleration"], wrap=2)
    .add(so.Dots())
)

image

The tick labels are hidden (matplotlib has actually removed them due to axis sharing logic) but the axis label is visible (I actually don't understand why that is; I didn't think we had logic for that but maybe we do). Probably we want either, or both, or tick labels but not axis label, but the current situation is the worst of all possible worlds.

Note that this specific situation also has some complex interactions with tight_layout / constrained_layout in terms of how much space is left between the other axes; it might be necessary to remove whichever ends up here "from the layout". Kind of a mess all around. Punting to after v0.12.0.

mwaskom avatar Aug 26 '22 23:08 mwaskom

The tick labels are hidden (matplotlib has actually removed them due to axis sharing logic) but the axis label is visible (I actually don't understand why that is; I didn't think we had logic for that but maybe we do).

This happens here: https://github.com/mwaskom/seaborn/blob/22cdfb0c93f8ec78492d87edb810f10cb7f57a31/seaborn/_core/plot.py#L1038

MaozGelbart avatar Dec 11 '22 21:12 MaozGelbart