Uh oh!
There was an error while loading. Please reload this page.
Fix duplicate shared boxplot tick labels - #630
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes a regression in UltraPlot’s boxplot wrapper where repeated boxplot() calls on axes with stronger x-axis sharing (sharex >= 2) could accumulate duplicate fixed tick labels, causing duplicated/bold x tick label rendering. Adds a regression test for the reported scenario (issue #628).
Changes:
- Add shared-axis detection for boxplot tick management and bypass Matplotlib’s appending tick-manager on shared tickers.
- Install fixed tick locator/formatter once per call for shared axes to prevent duplicated tick labels.
- Add a regression test ensuring shared x axes do not end up with duplicated tick label text.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
ultraplot/axes/plot.py | Avoid Matplotlib’s tick-manager path on shared tick axes and apply fixed ticks/labels without duplication. |
ultraplot/tests/test_plot.py | Adds regression test covering repeated boxplot calls under sharex=2 to ensure tick labels don’t duplicate. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
cvanelteren
commented
Mar 19, 2026
Manual inspection looks good. Merging. |
Uh oh!
There was an error while loading. Please reload this page.
* Fix shared boxplot tick labels * Document shared boxplot tick workaround * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This fixes the shared-axis boxplot regression where repeated
boxplotcalls on axes withsharex >= 2could append the same fixed tick labels multiple times, making the x tick labels appear duplicated or bold. The boxplot wrapper now avoids Matplotlib's appending tick manager on already shared axes and applies the intended tick labels once, with a regression test covering the reported case. Closes#628.