-
Notifications
You must be signed in to change notification settings - Fork 78
Collapse an axis's layout slot when its text is switched off #522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sselvakumaran
wants to merge
19
commits into
main
Choose a base branch
from
fix-axis-show
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
f7387f6
Collapse an axis's layout slot when its text is switched off
sselvakumaran 1b8798d
Name the news fragment for its PR
sselvakumaran 3d9ebb6
Reserve a gutter for a visible axis title, and check parity on every …
sselvakumaran b3e9c9c
Ask whether a title is drawn before reserving its gutter
sselvakumaran e99e1f8
Let the tick-label strategy decide tick-label room only
sselvakumaran 06670f6
Ask the colorbar's right-axis room the same question layout asks
sselvakumaran e2bc976
Read the polar recut's insets from the same visibility rules
sselvakumaran 2bc8b0d
Reserve for tick marks and for the title band they sit beside
sselvakumaran c1e562b
Say in the styling spec that a drawn title reserves its measured band
sselvakumaran 765f126
Keep the x-axis band whole, and grow a top title inward
sselvakumaran ce0baed
Tick geometry is not tick ink
sselvakumaran e7a7cc2
Reserve tick marks per side, and stop clamping what the renderers do not
sselvakumaran 72c62bb
Round only the title band, not the tick-label band beside it
sselvakumaran c951089
Make a zero-width tick mean the same thing in every renderer
sselvakumaran 13c7dd8
Let the gutter being asked about name its own dimension
sselvakumaran aaf39b6
Measure the two tick tiers apart, because they are drawn apart
sselvakumaran 721a4f5
A named axis has no minor tier to reserve for
sselvakumaran fb8e445
Reference the tier's own length in the minor-gutter thresholds
sselvakumaran e9b1867
Marks with no label reserve the marks, not a label
sselvakumaran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| `xy.x_axis(show=False)` and `xy.y_axis(show=False)` now collapse the axis's | ||
| layout slot instead of painting an invisible axis in a gutter it still | ||
| occupies. With `padding=0` a chart whose axes are switched off reaches the | ||
| container edge — the sparkline case the axes docs describe — rather than | ||
| sitting 25 px in, and a hidden right-side axis no longer reserves its flat | ||
| 54 px. Without an authored `padding` the label-aware default margins still | ||
| apply, as they always have; what changes is that a hidden axis no longer adds | ||
| its own gutter on top. The visibility shorthands compile to transparent paints | ||
| rather than to a flag, and the browser was measuring that invisible text back | ||
| into the gutter; the SVG and PNG exporters already skipped it on the left, so | ||
| the same chart exported flush and rendered inset. Both renderers now ask the | ||
| same question about the paint, on every side. `tick_label_strategy="off"` now | ||
| claims no tick-label room, the way `"none"` already did, while keeping the room | ||
| for the title it still draws — `"none"` suppresses that title too. Outward tick | ||
| marks answer to no text paint at all, so an axis that draws only those keeps | ||
| its band. A gutter is kept for an axis title only where a title is actually | ||
| drawn — not under | ||
| `tick_label_strategy="none"`, which suppresses the title as well, and not for an | ||
| `inside_*` title, which is drawn over the plot. Polar charts read the same | ||
| rules: switching the angular labels off reclaims the disc's inset whichever | ||
| switch does it, and the radial and angular titles keep their gutters only while | ||
| they are drawn. Axes that draw their text reserve exactly the room they did | ||
| before. |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.