Merge pull request #82 from bblacey/matplotlib-1.5
Upgraded Plot module to comply with matplotlib 1.5.x API
This commit is contained in:
commit
2eb194776b
|
@ -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
|
||||
|
|
|
@ -25,6 +25,7 @@ import FreeCAD
|
|||
|
||||
import PySide
|
||||
from PySide import QtCore, QtGui
|
||||
from distutils.version import StrictVersion as V
|
||||
|
||||
try:
|
||||
import matplotlib
|
||||
|
@ -32,7 +33,11 @@ try:
|
|||
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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user