self.setCanvasBackground(Qt.Qt.black)
self.plotLayout().setMargin(0)
self.plotLayout().setCanvasMargin(0)
self.plotLayout().setAlignCanvasToScales(False)
grid.attach(self)
grid.
setPen(Qt.
QPen(Qt.
Qt.
white,
0, Qt.
Qt.
DotLine))
# set axis titles
self.
setAxisTitle(Qwt.
QwtPlot.
xBottom,
'Time (usec)') self.
setAxisTitle(Qwt.
QwtPlot.
yLeft,
'Amplitude (V)')
# set axis scales
self.
setAxisScale(Qwt.
QwtPlot.
xBottom,
0.0,
10.0) self.
setAxisScale(Qwt.
QwtPlot.
yLeft,
-2.0,
2.0)[ATTACH
=CONFIG
]8606[/ATTACH
] self.
setAxisMaxMajor(Qwt.
QwtPlot.
xBottom,
25);
scaleDraw
= self.
axisScaleDraw(Qwt.
QwtPlot.
yLeft) scaleDraw.setMinimumExtent(scaleDraw.extent(
self.setCanvasBackground(Qt.Qt.black)
self.plotLayout().setMargin(0)
self.plotLayout().setCanvasMargin(0)
self.plotLayout().setAlignCanvasToScales(False)
grid = Qwt.QwtPlotGrid()
grid.attach(self)
grid.setPen(Qt.QPen(Qt.Qt.white, 0, Qt.Qt.DotLine))
# set axis titles
self.setAxisTitle(Qwt.QwtPlot.xBottom, 'Time (usec)')
self.setAxisTitle(Qwt.QwtPlot.yLeft, 'Amplitude (V)')
# set axis scales
self.setAxisScale(Qwt.QwtPlot.xBottom, 0.0, 10.0)
self.setAxisScale(Qwt.QwtPlot.yLeft, -2.0, 2.0)[ATTACH=CONFIG]8606[/ATTACH]
self.setAxisMaxMajor(Qwt.QwtPlot.xBottom, 25);
scaleDraw = self.axisScaleDraw(Qwt.QwtPlot.yLeft)
scaleDraw.setMinimumExtent(scaleDraw.extent(
Qt.QPen(), self.axisWidget(Qwt.QwtPlot.yLeft).font()))
To copy to clipboard, switch view to plain text mode
Bookmarks