@@ -0,0 +1,1608 @@
+# -*- coding: utf-8 -*-%0A%0A# Copyright (C) 2013 Michael Hogg%0A%0A# This file is part of BMDanalyse - See LICENSE.txt for information on usage and redistribution%0A%0A# Fixes error in pyqtgraph when importing NavigationToolbar2QTAgg. This class is not available%0A# in matplotlib any longer (since version?)%0A%0Afrom pyqtgraph.Qt import QtGui, QtCore, USE_PYSIDE%0Aimport matplotlib%0A%0Aif USE_PYSIDE: %0A    matplotlib.rcParams%5B'backend.qt4'%5D='PySide'%0A%0Afrom matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas%0Afrom matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar%0A#from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar%0Afrom matplotlib.figure import Figure%0A%0Aclass MatplotlibWidget(QtGui.QWidget):%0A    %22%22%22%0A    Implements a Matplotlib figure inside a QWidget.%0A    Use getFigure() and redraw() to interact with matplotlib.%0A    %0A    Example::%0A    %0A        mw = MatplotlibWidget()%0A        subplot = mw.getFigure().add_subplot(111)%0A        subplot.plot(x,y)%0A        mw.draw()%0A    %22%22%22%0A    %0A    def __init__(self, size=(5.0, 4.0), dpi=100):%0A        QtGui.QWidget.__init__(self)%0A        self.fig = Figure(size, dpi=dpi)%0A        self.canvas = FigureCanvas(self.fig)%0A        self.canvas.setParent(self)%0A        self.toolbar = NavigationToolbar(self.canvas, self)%0A        %0A        self.vbox = QtGui.QVBoxLayout()%0A        self.vbox.addWidget(self.toolbar)%0A        self.vbox.addWidget(self.canvas)%0A        %0A        self.setLayout(self.vbox)%0A%0A    def getFigure(self):%0A        return self.fig%0A        %0A    def draw(self):%0A        self.canvas.draw()%0A

Create MatplotlibWidget.py