1
0
Fork 0
mirror of https://github.com/Athemis/PyDSF.git synced 2025-04-05 14:46:03 +00:00

Added NavigationToolbar to plots.

This commit is contained in:
Alexander Minges 2015-02-08 20:02:48 +01:00
parent 5a17c960c2
commit 9d1e3d8fa2

View file

@ -1,6 +1,6 @@
from PyQt5 import QtWidgets
from PyQt5 import QtWidgets, QtGui, QtCore
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QTAgg as NavigationToolbar
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar
from matplotlib.figure import Figure
class MplCanvas(FigureCanvas):
@ -20,6 +20,8 @@ class MplWidget(QtWidgets.QWidget):
QtWidgets.QWidget.__init__(self, parent)
self.canvas = MplCanvas()
self.ntb = NavigationToolbar(self.canvas, self)
self.vbl = QtWidgets.QVBoxLayout()
self.vbl.addWidget(self.canvas)
self.vbl.addWidget(self.ntb)
self.setLayout(self.vbl)