本文整理汇总了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",