Skip to content

Commit

Permalink
Merge pull request #82 from bblacey/matplotlib-1.5
Browse files Browse the repository at this point in the history
Upgraded Plot module to comply with matplotlib 1.5.x API
  • Loading branch information
yorikvanhavre committed Jan 27, 2016
2 parents 23cc9ba + 9f907f5 commit 2eb1947
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -38,6 +38,7 @@ before_install:
- sudo apt-get install -y pyside-tools
- sudo apt-get install -y python-dev
- sudo apt-get install -y python-pyside
- sudo apt-get install -y python-matplotlib
- sudo apt-get install -y qt4-dev-tools
- sudo apt-get install -y qt4-qmake
- sudo apt-get install -y shiboken
Expand Down
7 changes: 6 additions & 1 deletion src/Mod/Plot/Plot.py
Expand Up @@ -25,14 +25,19 @@

import PySide
from PySide import QtCore, QtGui
from distutils.version import StrictVersion as V

try:
import matplotlib
matplotlib.use('Qt4Agg')
matplotlib.rcParams['backend.qt4']='PySide'
import matplotlib.pyplot as plt
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar
if V(matplotlib.__version__) < V("1.5.0"):
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar
else:
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar

from matplotlib.figure import Figure
except ImportError:
msg = PySide.QtGui.QApplication.translate(
Expand Down

0 comments on commit 2eb1947

Please sign in to comment.