Skip to content

FIX: get_tick_position() should disregard major/minor ticks that are not drawn #29388

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

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

timhoffm
Copy link
Member

Closes #21337 by ignoring major/minor ticks, if they are not used because of a NullLocator.

@timhoffm timhoffm added the PR: bugfix Pull requests that fix identified bugs label Dec 30, 2024
@timhoffm timhoffm added this to the v3.10.1 milestone Dec 30, 2024
@timhoffm timhoffm changed the title FIX: get_tick_position() disregards major/minor ticks that are not drawn FIX: get_tick_position() should disregard major/minor ticks that are not drawn Dec 30, 2024
Copy link
Member

@rcomer rcomer left a comment

Choose a reason for hiding this comment

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

The change makes sense to me but, since XAxis.get_ticks_position and YAxis.get_ticks_position are public, I wonder if there is any potential to break someone and it should wait for the meso release?

Closes matplotlib#21337 by ignoring major/minor ticks, if they are not used
because of a NullLocator.
@timhoffm timhoffm modified the milestones: v3.10.1, v3.11.0 Jan 5, 2025
@timhoffm
Copy link
Member Author

timhoffm commented Jan 5, 2025

The change makes sense to me but, since XAxis.get_ticks_position and YAxis.get_ticks_position are public, I wonder if there is any potential to break someone and it should wait for the meso release?

I don't really care. Bug fixes can break someone if they rely on the buggy behavior. I generally wouldn't make any guarantees on unintended behavior, but OTOH it doesn't harm if this fix waits a couple of months longer until rolled out.

@QuLogic QuLogic merged commit a1e4fab into matplotlib:main Jan 7, 2025
37 of 39 checks passed
@timhoffm timhoffm deleted the fix-tick-position branch January 7, 2025 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: bugfix Pull requests that fix identified bugs topic: ticks axis labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: moving ticks to the top or left with tick_params makes get_ticks_position return "unknown"
4 participants