feat(facet_wrap): add strip_position#1094
Merged
Merged
Conversation
For strip_placement="outside" the strips of a group were all shifted by the plot-edge axis band, so a panel that draws no axis on the strip's side (fixed scales, multi-row facets) got its strip floated outward to clear an axis that is not there — and the interior gullies were sized for strips that hug their panels, letting shifted strips overlap the panel below. Each strip now clears exactly the ticks, labels and panel-facing margin its own panel draws on that side (PlotLayoutItems.strip_shift); the side-level strip_band_offset keeps only its axis member, used for strip_placement="inside".
The free-scale gully terms added the tick and label extents but not the label margins, though the drawn labels honor them (the margin is applied as the tick pad). With a large margin and small panel_spacing the labels of one panel overlapped the neighbouring panel.
799c7b1 to
800b762
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ability to place the panel strips on any side of the panel
facet_wrapgains a validatedstrip_positionparameter (default"top", rendered output unchanged) and passes it through to the strips.strip_placement="inside"a bottom/left axis is pushed past the strip (spines, tick marks and labels); with"outside"each strip shifts past the axis its own panel draws — a panel with no axis on that side keeps its strip against the panel.axis_title_clearanceso_alignpads the other plots' titles.Fixes
Two latent layout bugs surfaced and are fixed here: