maybe this helps a little, put it at the end:
def main(args):
demo = make()
app.setMainWidget(demo)
#zoom
demo.canvas())
zoomer.
setRubberBandPen(qt.
QPen(qt.
Qt.
green)) #mouse coordinates
demo.canvas())
picker.
setTrackerPen(qt.
QPen(qt.
Qt.
black))
sys.exit(app.exec_loop())
# main()
# Admire
if __name__ == '__main__':
main(sys.argv)
# Local Variables: ***
# mode: python ***
# End: ***
def main(args):
app = qt.QApplication(args)
demo = make()
app.setMainWidget(demo)
#zoom
zoomer = Qwt.QwtPlotZoomer(Qwt.QwtPlot.xBottom,
Qwt.QwtPlot.yLeft,
Qwt.QwtPicker.DragSelection,
Qwt.QwtPicker.AlwaysOff,
demo.canvas())
zoomer.setRubberBandPen(qt.QPen(qt.Qt.green))
#mouse coordinates
picker = Qwt.QwtPlotPicker(Qwt.QwtPlot.xBottom,
Qwt.QwtPlot.yLeft,
Qwt.QwtPicker.NoSelection,
Qwt.QwtPlotPicker.CrossRubberBand,
Qwt.QwtPicker.AlwaysOn,
demo.canvas())
picker.setTrackerPen(qt.QPen(qt.Qt.black))
sys.exit(app.exec_loop())
# main()
# Admire
if __name__ == '__main__':
main(sys.argv)
# Local Variables: ***
# mode: python ***
# End: ***
To copy to clipboard, switch view to plain text mode
Bookmarks