8000 Fix resetting grid visibility by timhoffm · Pull Request #20161 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

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.

8000 @timhoffm timhoffm force-pushed the grid-reset branch from 3e4a204 to b2fcfc7 Compare May 4, 2021 20:20
@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 8000 May 6, 2021

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

@anntzer anntzer merged commit 2b8590c into matplotlib:master May 6, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request May 6, 2021
@timhoffm timhoffm deleted the grid-reset branch May 6, 2021 18:19
QuLogic added a commit that referenced this pull request May 6, 2021
…161-on-v3.4.x

Backport PR #20161 on branch v3.4.x (Fix resetting grid visibility)
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
0