Skip to content

MEP22 toolmanager does not set axes navigate_mode #18151

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

Closed
anntzer opened this issue Aug 2, 2020 · 6 comments
Closed

MEP22 toolmanager does not set axes navigate_mode #18151

anntzer opened this issue Aug 2, 2020 · 6 comments
Labels
Good first issue Open a pull request against these issues if there are no active ones! MEP: MEP22 tool manager
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Aug 2, 2020

Bug report

Bug summary

Noted while looking at #18150: when using MEP22 toolmanager, ax.get_navigate_mode() always returns None even when a tool is active.

Code for reproduction

ax = plt.gca()
# trigger the zoom tool
print(ax.get_navigate_mode())

Actual outcome

None

Expected outcome

"zoom rect"

Matplotlib version

  • Operating system: linux
  • Matplotlib version: master
  • Matplotlib backend (print(matplotlib.get_backend())): qt5agg
  • Python version: 38
  • Jupyter version (if applicable):
  • Other libraries:
@anntzer anntzer added MEP: MEP22 tool manager Good first issue Open a pull request against these issues if there are no active ones! labels Aug 2, 2020
@Chinmay922
Copy link

I would like to look into this issue.

@tacaswell tacaswell added this to the v3.4.0 milestone Aug 3, 2020
@tacaswell
Copy link
Member

@Chinmay922 Great! The code you are going to have to work with is in https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backend_tools.py please ask here or https://gitter.im/matplotlib/matplotlib if you have any questions.

@xordux
Copy link

xordux commented Sep 14, 2020

Hello,
I hope you are doing fine. I tried to reproduce it in my (windows) machine but I think it is not reproducing. As per the issue outcome should be None but I am getting "ZOOM" (not "zoom rect").

In the issue details I can see that "Linux" OS is mentioned. Is this a linux only issue? If yes, then which version of Linux I should try it on?

I am using Python 3.8 64 bit, if that matters.

@QuLogic
Copy link
Member

QuLogic commented Sep 15, 2020

Did you switch the toolbar rcParam to toolmanager first?

@xordux
Copy link

xordux commented Sep 15, 2020

Did you switch the toolbar rcParam to toolmanager first?

@QuLogic Thanks a lot. I didn't do that. Now the following code is reproducing the issue.

import matplotlib.pyplot as plt
plt.ion()
plt.rcParams['toolbar'] = 'toolmanager'
ax = plt.gca()
# trigger the zoom tool in the generated plot
print(ax.get_navigate_mode())

@tacaswell
Copy link
Member

closed by #18493

@QuLogic QuLogic modified the milestones: v3.5.0, v3.4.0 Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Open a pull request against these issues if there are no active ones! MEP: MEP22 tool manager
Projects
None yet
Development

No branches or pull requests

5 participants