Skip to content

fix: dedupe boxplot ticks on shared axes#632

Closed
saschabuehrle wants to merge 1 commit intoUltraplot:mainfrom
saschabuehrle:fix/issue-628
Closed

fix: dedupe boxplot ticks on shared axes#632
saschabuehrle wants to merge 1 commit intoUltraplot:mainfrom
saschabuehrle:fix/issue-628

Conversation

@saschabuehrle
Copy link

Bug

Fixes #628 — with shared x-axes, repeated boxplot() calls can leave duplicated tick positions/labels (e.g. 0..9 rendered twice), which causes doubled/bold tick labels.

Fix

  • After the native boxplot call, deduplicate managed axis tick positions while preserving order.
  • Apply this only when manage_ticks is active, so explicit tick management still behaves as requested.

Tests

  • Added regression test: test_boxplot_shared_x_does_not_duplicate_ticks
  • Ran:
    • pytest ultraplot/tests/test_statistical_plotting.py -k boxplot_shared_x_does_not_duplicate_ticks

Happy to adjust if you prefer a different location for the dedupe logic.

Greetings, saschabuehrle

@cvanelteren
Copy link
Collaborator

Thanks! Closing in favor of #630

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Boxplots have duplicate xtick labels when enabling x axis sharing

2 participants