def __init__(self, parent=None, width=6, height=5):
fig = mpl.figure.Figure(figsize=(width, height), dpi=96)
self.fig = fig
self.axes = fig.add_subplot(111)
self.fig.subplots_adjust(left=0.15, right=0.97, bottom=0.15, top=0.97)
# self.axes.hold(False) # clear axes every time plot() is called
Canvas.__init__(self, fig)
self.setParent(parent)
self.updateGeometry()
fm = QtGui.QFontMetrics(self.font())
self.fontsize = int(fm.height()) / 1.25
评论列表
文章目录