Skip to content

Refactor handling of tick and ticklabel visibility in Axis.clear() #22587

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
Mar 16, 2022

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented Mar 3, 2022

This is a follow-up to #20826, which makes the exceptions from clearing more explicit.

While being a bit more verbose, this makes it more clear what is going on. Also I think having proper _reset_*_tick_kw methods will make patching the 3D default tick direction for #22517 (comment) easy. Something along the lines (to be tested):

# in axis3d.py
class Axis(...):

    def reset_major_tick_kw(keep_tick_and_label_visibility=False)
        super().reset_major_tick_kw(keep_tick_and_label_visibility)
        self._major_tick_kw['tickdir'] = 'inout'

The test introduced in #20826 should verify that this solution is equivalent and does not break something.

This is a follow-up to matplotlib#20826, which makes the exceptions from clearing
more explicit.
@timhoffm timhoffm added this to the v3.6.0 milestone Mar 3, 2022
Reset major tick params to defaults.

Shared subplots pre-configure tick and label visibility. To keep this
beyond an Axis.clear() operation, we may
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
beyond an Axis.clear() operation, we may
beyond an `Axis.clear()` operation, we may

(Or something similar. If possible. For both methods.)

@QuLogic QuLogic merged commit 945692c into matplotlib:main Mar 16, 2022
@timhoffm timhoffm deleted the refactor-tick-clearing branch June 10, 2022 21:19
@QuLogic QuLogic changed the title Refactor handling of tick and ticklabel visiblity in Axis.clear() Refactor handling of tick and ticklabel visibility in Axis.clear() Aug 22, 2022
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.

3 participants