mauroalberti / qProf

Python plugin for QGIS, to create topographic and geological profiles
GNU General Public License v3.0
25 stars 3 forks source link

Update mpl_widget.py #2

Closed ghost closed 8 years ago

ghost commented 8 years ago

On Ubuntu 16.04, QGIS 2.16, plugin installation fails with the following error: ImportError: cannot import name NavigationToolbar2QTAgg

Searched for this error on Google and found out the appropiate name is NavigationToolbar2QT, so I edited the file locally and that fixed the problem.

ghost commented 8 years ago

According to this: http://matplotlib.org/devdocs/api/api_changes.html?highlight=navigationtoolbar2qtagg#remove-navigationtoolbar2qtagg

NavigationToolbar2QTAgg was removed from matplotlib 1.5.0

mauroalberti commented 8 years ago

Thanks for the pull. I have to test if I have to use a conditional import, depending on the available Matplotlib version, if lower than 1.5.0 or not. A new release of the plugin is planned within 20 days, I will incorporate a possibly modified version of the pull..

mauroalberti commented 8 years ago

Posted in QGIS Plugin Repository a patch, 0.3.2, for the Matplotlib 1.5.0 API break. Modified code as suggested by caesarivs in current master, that will become 0.3.3.