Fix axis and tick-label APIs [mpl compatibility] - #244
Conversation
Merging this PR will degrade performance by 24%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | test_select_lasso_message_1m |
90.5 ms | 119.1 ms | -24% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing agent/axis-tick-api-compat-perfrepro (3f3d5c3) with main (989a3a7)2
Footnotes
-
1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports. ↩
-
No successful run was found on
main(bf903bc) during the generation of this report, so 989a3a7 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
|
seems like this fix is fine, but other issues that might be fixed with other PRs:
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Addressed the tick-label spacing feedback in Matplotlib has two independent defaults here: a 3.5 pt major-tick length and a further 3.5 pt label pad. XY emitted the tick length but then placed labels with fixed renderer offsets, leaving roughly 1 px between the outward tick and its label. The browser, SVG, and PNG renderers now place labels after The orange line touching the x limits is the separate autoscale-domain issue owned by #240, so I did not duplicate that change here. Verification:
I also audited the existing CodSpeed red. It only flags the unrelated |

Summary
Add the missing Matplotlib 3.11 axis/tick compatibility surface used across the static gallery:
set_xticklabels/set_yticklabels, including empty-label hiding and FixedLocator length checksxaxis.grid(...)/yaxis.grid(...)rotation_mode/labelrotation_modeand tick-label rotation handlesThis branch deliberately excludes all autoscale-margin behavior owned by #240.
Gallery reference
Before / Matplotlib / after
Before,
set_xticklabels([])aborts the gallery and the upper axes' labels collide with the lower axes. After, both figures complete and the intended upper tick labels are hidden.The APIs also move several additional gallery files past their prior crashes. I am not claiming those visually complete here:
boxplot_vs_violin.pyreaches an existing boxplot geometry defect, andauto_ticks.pystill needs #240's margin API.Verification
541 passed, 65 skippedintests/pyplotmultiple_figs_demo.py: both PNG captures completegit diff --checkpass