本文整理匯總了Python中silx.gui.plot.PlotWidget.resetZoom方法的典型用法代碼示例。如果您正苦於以下問題:Python PlotWidget.resetZoom方法的具體用法?Python PlotWidget.resetZoom怎麽用?Python PlotWidget.resetZoom使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類silx.gui.plot.PlotWidget
的用法示例。
在下文中一共展示了PlotWidget.resetZoom方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: RGBCorrelatorGraph
# 需要導入模塊: from silx.gui.plot import PlotWidget [as 別名]
# 或者: from silx.gui.plot.PlotWidget import resetZoom [as 別名]
#.........這裏部分代碼省略.........
if label not in ['HORIZONTAL', 'VERTICAL', 'LINE']:
return
ddict['mode'] = label
ddict['pixelwidth'] = self._pickerSelectionWidthValue.value()
self.sigProfileSignal.emit(ddict)
def _addToolButton(self, icon, action, tip, toggle=None, state=None, position=None):
tb = qt.QToolButton(self.toolBar)
if icon is not None:
tb.setIcon(icon)
tb.setToolTip(tip)
if toggle is not None:
if toggle:
tb.setCheckable(1)
if state is not None:
if state:
tb.setChecked(state)
else:
tb.setChecked(False)
if position is not None:
self.toolBarLayout.insertWidget(position, tb)
else:
self.toolBarLayout.addWidget(tb)
if action is not None:
tb.clicked.connect(action)
return tb
def __zoomReset(self):
self._zoomReset()
def _zoomReset(self, replot=None):
_logger.debug("_zoomReset")
if self.graph is not None:
self.graph.resetZoom()
def _yAutoScaleToggle(self):
if self.graph is not None:
self.yAutoScaleToolButton.setDown(
not self.graph.isYAxisAutoScale())
self.graph.setYAxisAutoScale(
not self.graph.isYAxisAutoScale())
def _xAutoScaleToggle(self):
if self.graph is not None:
self.xAutoScaleToolButton.setDown(
not self.graph.isXAxisAutoScale())
self.graph.setXAxisAutoScale(
not self.graph.isXAxisAutoScale())
def _copyIconSignal(self):
pngFile = BytesIO()
self.graph.saveGraph(pngFile, fileFormat='png')
pngFile.flush()
pngFile.seek(0)
pngData = pngFile.read()
pngFile.close()
image = qt.QImage.fromData(pngData, 'png')
qt.QApplication.clipboard().setImage(image)
def _saveIconSignal(self):
self.saveDirectory = PyMcaDirs.outputDir
fileTypeList = ["Image *.png",
"Image *.jpg",
"ZoomedImage *.png",
"ZoomedImage *.jpg",