Skip to content
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

For python version >3.6 NavigationToolbar2TkAgg-> NavigationToolbar2Tk #5

Open
jhgeeyang opened this issue May 25, 2021 · 1 comment

Comments

@jhgeeyang
Copy link

NavigationToolbar2TkAgg-> NavigationToolbar2Tk for gui.py

@AlbCa
Copy link

AlbCa commented Sep 28, 2023

I follow this, fixing the issue would be great!

NavigationToolbar2TkAgg class was deprecated in version 2.2. In newer mpl versions, NavigationToolbar2Tk works exactly the same as NavigationToolbar2TkAgg, so it could be used a hack like the following:

try:
from matplotlib.backends.backend_tkagg import NavigationToolbar2TkAgg
except ImportError:
from matplotlib.backends.backend_tkagg import NavigationToolbar2Tk as NavigationToolbar2TkAgg

that would support both older matplotlib versions and newer ones.

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

No branches or pull requests

2 participants