Skip to content

[Bug Fix] Fix reverse mapping for _translate_tick_params - #29249

Merged
rcomer merged 2 commits into
matplotlib:mainfrom
kc9323:kw_translation_bugfix
Dec 8, 2024
Merged

rcomer merged 2 commits into
matplotlib:mainfrom
kc9323:kw_translation_bugfix

Conversation

@kc9323

@kc9323 kc9323 commented Dec 7, 2024 •

Copy link
Copy Markdown
Contributor

PR summary

Hi. This fixes a bug in _translate_tick_params where some keys are not being mapped correctly with reverse=True and cls.axis_name = 'x'.

For example, both 'left' and 'bottom' are mapped to 'tick1On', making the reverse ambiguous.

Separated from #28968 because this is an independent bug.

PR checklist

@timhoffm timhoffm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for splitting.

Note: Test failures are unrelated.

@QuLogic

QuLogic commented Dec 7, 2024

Copy link
Copy Markdown
Member

I thought we already had a PR for this; did it not get merged?

@rcomer

rcomer commented Dec 7, 2024

Copy link
Copy Markdown
Member

This fixes #27416, which does have two existing PRs but both seem to have stalled.

@rcomer rcomer linked an issue Dec 7, 2024 that may be closed by this pull request
Comment thread lib/matplotlib/axis.py Resolved
Co-authored-by: Ruth Comer <10599679+rcomer@users.noreply.github.com>
@rcomer rcomer added this to the v3.10.0 milestone Dec 8, 2024
@rcomer
rcomer merged commit 9af426b into matplotlib:main Dec 8, 2024
@rcomer

rcomer commented Dec 8, 2024

Copy link
Copy Markdown
Member

Thanks @kyracho!

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Dec 8, 2024
@kc9323
kc9323 deleted the kw_translation_bugfix branch December 8, 2024 09:20
rcomer added a commit that referenced this pull request Dec 8, 2024
…249-on-v3.10.x

Backport PR #29249 on branch v3.10.x ([Bug Fix] Fix reverse mapping for _translate_tick_params)
@timhoffm timhoffm mentioned this pull request Dec 9, 2024
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: get_tick_params on xaxis shows wrong keywords

4 participants