keurfonluu / AIPycker

Pycker provides user-friendly routines to visualize seismic traces and pick first break arrival times.
MIT License
43 stars 6 forks source link

For python version >3.6 NavigationToolbar2TkAgg-> NavigationToolbar2Tk #5

Open jhgeeyang opened 3 years ago

jhgeeyang commented 3 years ago

NavigationToolbar2TkAgg-> NavigationToolbar2Tk for gui.py

AlbCa commented 1 year ago

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.