def __createPlot(self, parent): plot = silx.gui.plot.PlotWidget(parent=parent) plot.setKeepDataAspectRatio(True) plot.setDataMargins(0.1, 0.1, 0.1, 0.1) plot.setGraphXLabel("X") plot.setGraphYLabel("Y") colormap = CalibrationContext.instance().getRawColormap() plot.setDefaultColormap(colormap) from silx.gui.plot import tools toolBar = tools.InteractiveModeToolBar(parent=self, plot=plot) plot.addToolBar(toolBar) toolBar = tools.ImageToolBar(parent=self, plot=plot) colormapDialog = CalibrationContext.instance().getColormapDialog() toolBar.getColormapAction().setColorDialog(colormapDialog) plot.addToolBar(toolBar) toolBar = qt.QToolBar(self) plot3dAction = qt.QAction(self) plot3dAction.setIcon(icons.getQIcon("pyfai:gui/icons/3d")) plot3dAction.setText("3D visualization") plot3dAction.setToolTip("Display a 3D visualization of the detector") plot3dAction.triggered.connect(self.__display3dDialog) toolBar.addAction(plot3dAction) plot.addToolBar(toolBar) return plot
def __createPlot(self, parent): plot = silx.gui.plot.PlotWidget(parent=parent) plot.setKeepDataAspectRatio(True) plot.setDataMargins(0.1, 0.1, 0.1, 0.1) plot.setGraphXLabel("Y") plot.setGraphYLabel("X") colormap = CalibrationContext.instance().getRawColormap() plot.setDefaultColormap(colormap) from silx.gui.plot import tools toolBar = tools.InteractiveModeToolBar(parent=self, plot=plot) plot.addToolBar(toolBar) toolBar = tools.ImageToolBar(parent=self, plot=plot) colormapDialog = CalibrationContext.instance().getColormapDialog() toolBar.getColormapAction().setColorDialog(colormapDialog) plot.addToolBar(toolBar) return plot
def __createPlot(self, parent): plot = silx.gui.plot.PlotWidget(parent=parent) plot.setKeepDataAspectRatio(True) plot.setDataMargins(0.1, 0.1, 0.1, 0.1) plot.setGraphXLabel("Y") plot.setGraphYLabel("X") plot.setAxesDisplayed(False) colormap = CalibrationContext.instance().getRawColormap() plot.setDefaultColormap(colormap) from silx.gui.plot import tools toolBar = tools.InteractiveModeToolBar(parent=self, plot=plot) plot.addToolBar(toolBar) toolBar = tools.ImageToolBar(parent=self, plot=plot) colormapDialog = CalibrationContext.instance().getColormapDialog() toolBar.getColormapAction().setColorDialog(colormapDialog) plot.addToolBar(toolBar) statusBar = self.__createPlotStatusBar(plot) plot.setStatusBar(statusBar) return plot