Skip to content

Fix resetting grid visibility #20161

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
May 6, 2021
Merged

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented May 4, 2021

Actually, there were two issues:

  • 'gridOn' state should always be contained in the _tick_kw settings.
    This is needed because we support toggling via grid() and thus need
    to be able to query the state. Therefore, the _tick_kw dicts must be
    resetted instead of cleared.
  • grid(some_kwarg=...) i.e. with b=None and keywords must be treated
    explicitly as b=True as the docs already propose.

Closes #20149.

@timhoffm timhoffm added this to the v3.4.2 milestone May 4, 2021
Actually, there were two issues:

- 'gridOn' state should always be contained in the _tick_kw settings.
  This is needed because we support toggling via grid() and thus need
  to be able to query the state. Therefore, the _tick_kw dicts must be
  resetted instead of cleared.
- grid(some_kwarg=...) i.e. with b=None and keywords must be treated
  explicitly as b=True as the docs already propose.

Closes matplotlib#20149.
@jklymak jklymak assigned anntzer and unassigned anntzer May 6, 2021
@jklymak jklymak requested a review from anntzer May 6, 2021 18:00
@jklymak
Copy link
Member

jklymak commented May 6, 2021

@anntzer you worked on this most recently I think. Can you review?

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.

KeyError: 'gridOn' in axis.py when axis.tick_params() is used with reset = True
4 participants