def setup_widgets(self, parent, name): dock_area = DockArea() parent.addTab(dock_area, name) dock_position = Dock("Position") dock_area.addDock(dock_position) # Position 2d plot position_graphics = pg.GraphicsLayoutWidget() position_graphics.show() view = position_graphics.addViewBox() self.position_img = pg.ImageItem(border='w') view.addItem(self.position_img) dock_position.addWidget(position_graphics) # Status widget dock_status = Dock("Status", size=(800, 1)) dock_area.addDock(dock_status, 'top') cw = QtGui.QWidget() cw.setStyleSheet("QWidget {background-color:white}") layout = QtGui.QGridLayout() cw.setLayout(layout) self.spin_box = Qt.QSpinBox(value=1) self.spin_box.setMaximum(10) self.spin_box.setSuffix(" Threshold") layout.addWidget(self.spin_box, 0, 6, 0, 1) dock_status.addWidget(cw) self.spin_box.valueChanged.connect( lambda value: self.send_command(str(value)))
def makeLayout(self): self.dock_area = DockArea() self.setCentralWidget(self.dock_area) # self.setupUi(self) # self.qsettings = QtCore.QSettings('DemsarLabs','StepScanMeter') # geometry = self.qsettings.value('geometry', '') self.scan_area = ScanAreaWidget() self.scan_area_docker = QtWidgets.QDockWidget() self.scan_area_docker.setObjectName("docker") # self.plot_area_docker.setAllowedAreas(QtCore.Qt.TopDockWidgetArea) self.scan_area_docker.setWidget(self.scan_area) self.scan_setup_area = ScanSetupWidget() self.scan_setup_area_docker = QtWidgets.QDockWidget() self.scan_setup_area_docker.setObjectName('Scan Setup Area') # self.scan_setup_area_docker.setAllowedAreas(QtCore.Qt.LeftDockWidgetArea) self.scan_setup_area_docker.setWidget(self.scan_setup_area) self.scan_setup_area.set_scan_settings.connect( self.scan_area.acceptScanSettings) self.instrument_monitor = DockInstrumentMonitor() self.addDockWidget(QtCore.Qt.LeftDockWidgetArea, self.scan_setup_area_docker) self.addDockWidget(QtCore.Qt.TopDockWidgetArea, self.scan_area_docker) self.addDockWidget(QtCore.Qt.RightDockWidgetArea, self.instrument_monitor)
def layout(self): area = DockArea() self.win.setCentralWidget(area) self.win.resize(2000, 1900) self.win.setWindowTitle(self.title) docks = [] docks.append(Dock("Parameters", size=(500, 1000))) docks.append(Dock("Voltage", size=(1000, 250))) docks.append(Dock("Recovery current", size=(1000, 250))) docks.append(Dock("Phase plane", size=(1000, 500))) docks.append(Dock("Test set", size=(500, 1000))) docks.append(Dock("Analysis", size=(500, 350))) area.addDock( docks[4], 'left' ) ## place d1 at left edge of dock area (it will fill the whole space since there are no other docks yet) area.addDock(docks[0], 'right', docks[4]) area.addDock(docks[1], 'right') area.addDock(docks[2], 'bottom', docks[1]) area.addDock(docks[3], 'bottom', docks[2]) area.addDock(docks[5], 'bottom', docks[0]) for d, w in zip(docks, self.obj.widgets): d.addWidget(w)
def __init__(self, fit: chisurf.fitting.fit.FitGroup, *args, **kwargs): super(ParameterScanPlot, self).__init__(fit) self.layout = QtWidgets.QVBoxLayout(self) self.layout.setContentsMargins(0, 0, 0, 0) self.layout.setSpacing(0) self.data_x, self.data_y = None, None self.pltControl = ParameterScanWidget(model=fit.model, parent=self) area = DockArea() self.layout.addWidget(area) hide_title = plot_settings['hideTitle'] d2 = Dock("Chi2-Surface", hideTitle=hide_title) self.p1 = QtWidgets.QPlainTextEdit() p2 = pg.PlotWidget() d2.addWidget(p2) area.addDock(d2, 'top') distribution_plot = p2.getPlotItem() self.distribution_plot = distribution_plot self.distribution_curve = distribution_plot.plot(x=[0.0], y=[0.0], pen=pg.mkPen( colors['data'], width=lw), name='Data')
def __init__(self, imgFName='img', parent=None): QWidget.__init__(self, parent=None) self.palette = QPalette() self.cwd = os.getcwd() self.setup = Setup(os.path.join(self.cwd, 'SetupData')) self.detectors = self.setup.detectors self.motors = self.setup.motors self.scalers = self.setup.scalers self.imgFName = imgFName self.vblayout = QVBoxLayout(self) self.mainDock = DockArea(self, parent) self.vblayout.addWidget(self.mainDock) self.imageFlag = 0 self.pdIn = False self.beamIn = False self.mirrorIn = False self.align = True self.delay = 0.1 self.detPV = 'None' self.detParDock = Dock('Detector Parameters', size=(1, 1)) self.imgDock = Dock('Image', size=(1, 10)) self.mainDock.addDock(self.imgDock, 'left') self.mainDock.addDock(self.detParDock, 'left') self.mainDock.moveDock(self.imgDock, 'bottom', self.detParDock) self.create_imgDock() self.create_detParDock() self.fileWatcher = FileWatcher()
def __init__(self, scan_z, webcam_focus_lock, *args, **kwargs): super().__init__(*args, **kwargs) self.scan_z = scan_z self.filewarning = FileWarning() # Dock widget dockArea = DockArea() # Focus lock widget focusDock = Dock("Focus lock", size=(500, 500)) self.focusWidget = focus.FocusWidget(self.scan_z, webcam_focus_lock) focusDock.addWidget(self.focusWidget) dockArea.addDock(focusDock, "left") self.setWindowTitle('Tempesta - Focus lock edition') self.cwidget = QtGui.QWidget() self.setCentralWidget(self.cwidget) # Widgets' layout layout = QtGui.QGridLayout() self.cwidget.setLayout(layout) layout.addWidget(dockArea, 0, 0, 1, 1)
def __init__(self, fit: chisurf.fitting.fit.FitGroup, parent: QtWidgets.QWidget, **kwargs): super().__init__(fit=fit, parent=parent) self.layout = QtWidgets.QVBoxLayout(self) self.data_x, self.data_y = None, None self.pltControl = DistributionPlotControl(self, parent=self, **kwargs) area = DockArea() self.layout.addWidget(area) hide_title = plot_settings['hideTitle'] d2 = Dock("Fit", size=(500, 400), hideTitle=hide_title) self.p1 = QtWidgets.QPlainTextEdit() p2 = pg.PlotWidget(useOpenGL=pyqtgraph_settings['useOpenGL']) d2.addWidget(p2) area.addDock(d2, 'top') distribution_plot = p2.getPlotItem() self.distribution_plot = distribution_plot self.distribution_curve = distribution_plot.plot(x=[0.0], y=[0.0], pen=pg.mkPen( colors['data'], width=lw), name='Data')
def create_graph_views(self): """ Creates the window containing the graph views. :return: None """ dock_area = DockArea() self.setCentralWidget(dock_area) dock_3d = Dock('3D') dock_area.addDock(dock_3d) dock_1d = Dock('1D') dock_area.addDock(dock_1d, 'above', dock_3d) dock_2d = Dock('2D') dock_area.addDock(dock_2d, 'above', dock_3d) self.plot_3d = Plot3DWidget(self.model_wrapper, dock_3d) dock_3d.addWidget(self.plot_3d) self.plot_2d = Plot2DWidget(self.model_wrapper, self.statusBar(), dock_2d) dock_2d.addWidget(self.plot_2d) self.plot_1d = Plot1DWidget(self.model_wrapper, self.statusBar(), dock_1d) dock_1d.addWidget(self.plot_1d) # TODO: move away from this function dock_list = Dock('integration') dock_area.addDock(dock_list) dock_list.addWidget(IntegrationList(self.model_wrapper, dock_list))
def add_widgets(self): # Main window with dock area self.dock_area = DockArea() self.setCentralWidget(self.dock_area) dock_run_config = Dock("Run configuration", size=(400, 400)) # Docks dock_occcupancy = Dock("Occupancy", size=(400, 400)) #dock_tti = Dock("tti",size=(400, 400)) self.dock_area.addDock(dock_occcupancy) # Status widget cw = QtGui.QWidget() cw.setStyleSheet("QWidget {background-color:white}") layout = QtGui.QGridLayout() cw.setLayout(layout) # Run config dock self.run_conf_list_widget = Qt.QListWidget() dock_run_config.addWidget(self.run_conf_list_widget) # Global config dock self.global_conf_list_widget = Qt.QListWidget() # Different plot docks occupancy_graphics = pg.GraphicsLayoutWidget() occupancy_graphics.show() view = occupancy_graphics.addViewBox() self.occupancy_img = pg.ImageItem(border='w') view.addItem(self.occupancy_img) view.setRange(QtCore.QRectF(0, 0, 80, 336)) dock_occcupancy.addWidget(occupancy_graphics)
def __init__(self, fit): super().__init__(fit=fit) self.trajectory = fit.model self.source = fit.model self.layout = QtWidgets.QVBoxLayout(self) area = DockArea() self.layout.addWidget(area) hide_title = chisurf.settings.gui['plot']['hideTitle'] d1 = Dock("RMSD") d2 = Dock("dRMSD") d3 = Dock("Energy") d4 = Dock("FRET") p1 = pg.PlotWidget() p2 = pg.PlotWidget() p3 = pg.PlotWidget() p4 = pg.PlotWidget() d1.addWidget(p1) d2.addWidget(p2) d3.addWidget(p3) d4.addWidget(p4) area.addDock(d1, 'top') area.addDock(d2, 'right', d1) area.addDock(d3, 'bottom') area.addDock(d4, 'right', d3) # RMSD - Curves self.rmsd_plot = p1.getPlotItem() self.drmsd_plot = p2.getPlotItem() self.energy_plot = p3.getPlotItem() self.fret_plot = p4.getPlotItem() lw = chisurf.settings.gui['plot']['line_width'] self.rmsd_curve = self.rmsd_plot.plot(x=[0.0], y=[0.0], pen=pg.mkPen(colors['irf'], width=lw), name='rmsd') self.drmsd_curve = self.drmsd_plot.plot(x=[0.0], y=[0.0], pen=pg.mkPen(colors['data'], width=lw), name='drmsd') self.energy_curve = self.energy_plot.plot(x=[0.0], y=[0.0], pen=pg.mkPen( colors['models'], width=lw), name='energy') self.fret_curve = self.fret_plot.plot(x=[0.0], y=[0.0], pen=pg.mkPen(colors['models'], width=lw), name='fret')
def __init_gui(self): self.graphs = {} self.area = DockArea() self.__create_graph( graph_id='std', pos='top', widget=pyqtgraph.PlotWidget( title='Std participation vs % Yes votes'), ) self.std_mean_plot = self.graphs['std']['widget'].plot() self.std_mean_plot.setZValue(10) self.__create_graph( graph_id='taiko', pos='right', widget=pyqtgraph.PlotWidget( title='Taiko participation vs % Yes votes'), ) self.taiko_mean_plot = self.graphs['taiko']['widget'].plot() self.taiko_mean_plot.setZValue(10) self.__create_graph( graph_id='catch', pos='bottom', widget=pyqtgraph.PlotWidget( title='Catch participation vs % Yes votes'), ) self.catch_mean_plot = self.graphs['catch']['widget'].plot() self.__create_graph( graph_id='mania', pos='right', relative_to=self.graphs['catch']['dock'], widget=pyqtgraph.PlotWidget( title='Mania participation vs % Yes votes'), ) self.mania_mean_plot = self.graphs['mania']['widget'].plot() self.mania_mean_plot.setZValue(10) self.graphs['std']['widget'].setLabel('left', '% Yes') self.graphs['std']['widget'].setLabel('bottom', '# Total Votes') self.graphs['taiko']['widget'].setLabel('left', '% Yes') self.graphs['taiko']['widget'].setLabel('bottom', '# Total Votes') self.graphs['catch']['widget'].setLabel('left', '% Yes') self.graphs['catch']['widget'].setLabel('bottom', '# Total Votes') self.graphs['mania']['widget'].setLabel('left', '% Yes') self.graphs['mania']['widget'].setLabel('bottom', '# Total Votes') self.setCentralWidget(self.area)
def create_dock(self): area = DockArea() self.obj_graph['param']['dock'] = Dock("setting parameters") self.obj_graph['plot']['dock'] = Dock("R (V) function of current (mA)") self.obj_graph['plot2']['dock'] = Dock("Phi (deg) function of current (mA)") area.addDock(self.obj_graph['param']['dock'], 'left') area.addDock(self.obj_graph['plot']['dock'],'right') area.addDock(self.obj_graph['plot2']['dock'],'bottom',self.obj_graph['plot']['dock']) self.setCentralWidget(area)
def ui_setup(self): '''Calls all functions needed to set up UI programmatically. This object is called from :meth:`setup`''' self.ui = DockArea() self.layout = QtWidgets.QVBoxLayout() self.ui.show() self.ui.setWindowTitle('ALD Control Panel') self.ui.setLayout(self.layout) self.widget_setup() self.dockArea_setup()
def create_dock(self): area = DockArea() self.obj_graph['param']['dock'] = Dock("setting parameters") self.obj_graph['plot']['dock'] = Dock("graphic 1") self.obj_graph['plot2']['dock'] = Dock("graphic 2") area.addDock(self.obj_graph['param']['dock'], 'left') area.addDock(self.obj_graph['plot']['dock'], 'right') area.addDock(self.obj_graph['plot2']['dock'], 'bottom', self.obj_graph['plot']['dock']) self.setCentralWidget(area)
def __init__(self, parent=None, title="fluxi window"): QtGui.QMainWindow.__init__(self, parent) self.setWindowTitle(title) self.area = area = DockArea() self.setCentralWidget(area) def close_function(): pass self.close_function = close_function
def addTempArea(self): if self.home is None: area = DockArea(temporary=True, home=self) self.tempAreas.append(area) win = TempAreaWindow(area) area.win = win win.show() else: area = self.home.addTempArea() # print "added temp area", area, area.window() return area
def _add_btn_layout(self): # add a DockArea for buttons area = DockArea() dock = Dock("Functions") area.addDock(dock) area.show() self.vlayout.addWidget(area, 1, 1) btn_layout = pg.LayoutWidget() dock.addWidget(btn_layout) self.btn_layout = btn_layout
def addTempArea(self): if self.home is None: area = DockArea(temporary=True, home=self) self.tempAreas.append(area) win = TempAreaWindow(area) win.setWindowFlags(Qt.Qt.WindowMinimizeButtonHint) area.win = win win.show() else: area = self.home.addTempArea() #print "added temp area", area, area.window() return area
def __init__(self, settings): super(MainWindow, self).__init__() self.settings = settings self.setupUi(self) self.dock_area = DockArea() self.setCentralWidget(self.dock_area) self.createDocks() self.loadSettings()
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.setWindowTitle('Scripting') # Actions in menubar menuBar = self.menuBar() file = menuBar.addMenu('&File') self.newFileAction = QtWidgets.QAction('New…', self) self.newFileAction.setShortcut('Ctrl+N') self.newFileAction.triggered.connect(self.sigNewFile) file.addAction(self.newFileAction) self.openFileAction = QtWidgets.QAction('Open…', self) self.openFileAction.setShortcut('Ctrl+O') self.openFileAction.triggered.connect(self.sigOpenFile) file.addAction(self.openFileAction) self.saveFileAction = QtWidgets.QAction('Save', self) self.saveFileAction.setShortcut('Ctrl+S') self.saveFileAction.triggered.connect(self.sigSaveFile) file.addAction(self.saveFileAction) self.saveAsFileAction = QtWidgets.QAction('Save as…', self) self.saveAsFileAction.setShortcut('Ctrl+Shift+S') self.saveAsFileAction.triggered.connect(self.sigSaveAsFile) file.addAction(self.saveAsFileAction) # Main layout self.dockArea = DockArea() self.setCentralWidget(self.dockArea) self.editor = EditorView() self.editorDock = Dock('Script Editor') self.editorDock.addWidget(self.editor) self.dockArea.addDock(self.editorDock) self.files = FilesView() self.filesDock = Dock('Files') self.filesDock.addWidget(self.files) self.dockArea.addDock(self.filesDock, 'left', self.editorDock) self.console = ConsoleView() self.consoleDock = Dock('Console') self.consoleDock.addWidget(self.console) self.dockArea.addDock(self.consoleDock, 'right', self.editorDock) self.output = OutputView() self.outputDock = Dock('Output') self.outputDock.addWidget(self.output) self.dockArea.addDock(self.outputDock, 'bottom', self.editorDock) self.editorDock.setStretch(20, 30) self.showMaximized()
def __init__(self, parent=None, hideHistograms=False) -> None: BaseClassTemplate.__init__(self, parent=parent) self.uiBase = BaseWidgetTemplate() self.uiBase.setupUi(self) ############################################################# # ATTRIBUTES # ############################################################# self.gui_timer = QTimer() # type: QTimer self.gui_timer.timeout.connect(self.updateDisplay) if self.uiBase.wao_Display.isChecked(): self.gui_timer.start(1000. / self.uiBase.wao_frameRate.value()) self.loopLock = threading.Lock( ) # type: Threading.Lock # Asynchronous loop / display safe-threading self.hideHistograms = hideHistograms ############################################################# # PYQTGRAPH DockArea INIT # ############################################################# self.area = DockArea() self.uiBase.wao_DisplayDock.setWidget(self.area) self.gridSH = [] ############################################################# # CONNECTED BUTTONS # ############################################################# # Default path for config files self.defaultParPath = "." self.defaultAreaPath = "." self.uiBase.wao_loadConfig.clicked.connect(self.loadConfig) self.uiBase.wao_loadArea.clicked.connect(self.loadArea) self.uiBase.wao_saveArea.clicked.connect(self.saveArea) self.uiBase.wao_init.clicked.connect(self.initConfig) self.uiBase.wao_configFromFile.clicked.connect(self.addConfigFromFile) self.uiBase.wao_Display.stateChanged.connect(self.gui_timer_config) self.uiBase.wao_frameRate.setValue(2) self.uiBase.wao_loadConfig.setDisabled(False) self.uiBase.wao_init.setDisabled(True) self.disp_checkboxes = [] self.docks = {} # type: Dict[str, pg.dockarea.Dock] self.viewboxes = {} # type: Dict[str, pg.ViewBox] self.imgs = {} # type: Dict[str, pg.ImageItem] self.hists = {} # type: Dict[str, pg.HistogramLUTItem] self.PupilLines = None self.adjustSize()
def initDialogSummary(self, result, KData=None): # 1) creates layouts dialog = QtGui.QDialog() mainLayout = QtGui.QHBoxLayout() rightLayout = QtGui.QVBoxLayout() mainLayout.addLayout(rightLayout) dialog.setLayout(mainLayout) dialog.setWindowTitle(('Strategy Results')) import os, sys xpower = os.path.abspath( os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir, 'midProjects', 'histdataUI')) sys.path.append(xpower) from Widgets.pgCandleWidgetCross import pgCandleWidgetCross from Widgets.pgCrossAddition import pgCrossAddition from pyqtgraph.dockarea import DockArea, Dock area = DockArea() rightLayout.addWidget(area) # 2) creates widgets # 2.1)candle pgCandleView = pgCandleWidgetCross(dataForCandle=KData) dCandle = Dock("candles", closable=True, size=(200, 300)) ## give this dock the minimum possible size area.addDock(dCandle, 'bottom') dCandle.addWidget(pgCandleView) # 2) creates widgets # 2.3)position_cost if (True): PyqtGraphPositionCost = pgCrossAddition() self.availableCashPlot(PyqtGraphPositionCost) dAvailableCash = Dock("available_cash", closable=True, size=(200, 100)) area.addDock(dAvailableCash, 'bottom') dAvailableCash.addWidget(PyqtGraphPositionCost) PyqtGraphPositionCost.setXLink(pgCandleView) # 2.3)position_cost if (True): PyqtGraphPositionCost = pgCrossAddition() self.portfolioPlot(PyqtGraphPositionCost) dPortfolioValue = Dock("portfolio_value", closable=True, size=(200, 100)) area.addDock(dPortfolioValue, 'bottom') dPortfolioValue.addWidget(PyqtGraphPositionCost) PyqtGraphPositionCost.setXLink(pgCandleView) return dialog
def realinit(self): self.docklist = [ 'self.drho', 'self.dlamb', 'self.dalpha', 'self.dbeta', 'self.dphase', 'self.dcontrols' ] self.area = DockArea() self.drho = Dock("Particle Density \u2374", closable=True) self.dlamb = Dock("Hopping Rate \u03bb", closable=True) self.dphase = Dock("Phase Diagram", closable=True) self.dcontrols = Dock("Controls", closable=True) self.dalpha = Dock( "Current J and average density \u27e8\u2374\u27e9 as a function of \u03b1", closable=True) self.dbeta = Dock( "Current J and average density \u27e8\u2374\u27e9 as a function of \u03b2", closable=True) self.layout = QtGui.QHBoxLayout() self.layout.addWidget(self.area) self.mainframe.setLayout(self.layout) self.mainframe.setFrameStyle(QtGui.QFrame.Box | QtGui.QFrame.Raised) self.mainframe.setLineWidth(8) pg.setConfigOptions(antialias=True) self.rh = rho.rho(self.drho) self.jalph = jalpha.jalpha(self.dalpha, self.rh) self.jbet = jbeta.jbeta(self.dbeta, self.rh) self.phas = phase.phase(self.dphase) self.lamb_po = lamb_pol.lamb_pol(self.dlamb) self.slid = slider.Widget(self.dcontrols, self.lamb_po, self.phas, self.rh, self.jbet, self.jalph) self.lamb_po.receive(self.slid) # default values to restore is input self.savedlambdas = glo_var.lambdas[:] self.savedalpha = glo_var.alpha self.savedbeta = glo_var.beta self.savedl = glo_var.l self.pltlist = [['Lambda_fig', self.lamb_po.p1], ['Density_fig', self.rh.p2], ['Current_alpha_fig', self.jalph.plotitemtoexport], ['Current_beta_fig', self.jbet.plotitemtoexport], ['Phase_fig', self.phas.p5]] self.grid_view_1() self.setCentralWidget(self.area)
def setup_widgets(self, parent, name): dock_area = DockArea() parent.addTab(dock_area, name) dock_position = Dock("Position") dock_area.addDock(dock_position) # Position 2d plot position_graphics = pg.GraphicsLayoutWidget() position_graphics.show() view = position_graphics.addViewBox() self.position_img = pg.ImageItem(border='w') view.addItem(self.position_img) dock_position.addWidget(position_graphics)
def _InitDocks(self): # Define docking area if hasattr(self, "_dockArea"): self._dockArea.setParent(None) self._dockArea = DockArea() self._plotDocks = self._defaultDockPos.keys() # Add dock to area for dock, pos in self._defaultDockPos.iteritems(): self._dockArea.addDock(dock, *pos) self._layout.addWidget(self._dockArea, 0, 0, 1, 1)
def main(): app = QtWidgets.QApplication(sys.argv) win = QtWidgets.QMainWindow() area = DockArea() win.setCentralWidget(area) win.show() dock = Dock(name='Test Dock', area=area) area.addDock(dock) QtCore.QThread.sleep(2) dock.close() QtWidgets.QApplication.processEvents() sys.exit(app.exec_())
def setupPlots(self): self.area = DockArea() self.setCentralWidget(self.area) self.plotDict = dict() # initialize all the plot windows we want plotNames = self.config.get( 'PlotNames', ['Scan'] ) if len(plotNames)<1: plotNames.append('Scan') for name in plotNames: dock = Dock(name) widget = CoordinatePlotWidget(self) view = widget._graphicsView self.area.addDock(dock, "bottom") dock.addWidget(widget) self.plotDict[name] = {"dock":dock, "widget":widget, "view":view}
def __init__(self): self._app = QtGui.QApplication([]) self._MainWindow = QtGui.QMainWindow() self._DockArea = DockArea() self._MainWindow.setCentralWidget(self._DockArea) self._MainWindow.resize(1000, 800) self._MainWindow.setWindowTitle('Yaapt') pg.setConfigOptions(antialias=True) pg.setConfigOption('background', 'w') pg.setConfigOption('foreground', 'k') # XYPlotDock(self._DockArea, 'Laser Alignment') YTPlotDock(self._DockArea, 'Plot1') YTPlotDock(self._DockArea, 'Plot2')
def __init_gui(self): self.graphs = {} self.area = DockArea() self.__create_graph( graph_id='std', pos='top', widget=pyqtgraph.PlotWidget( title='% of Maps Loved vs % Yes Threashold'), ) self.__create_graph( graph_id='taiko', pos='right', widget=pyqtgraph.PlotWidget( title='% of Maps Loved vs % Yes Threashold'), ) self.__create_graph( graph_id='catch', pos='bottom', widget=pyqtgraph.PlotWidget( title='% of Maps Loved vs % Yes Threashold'), ) self.__create_graph( graph_id='mania', pos='right', relative_to=self.graphs['catch']['dock'], widget=pyqtgraph.PlotWidget( title='% of Maps Loved vs % Yes Threashold'), ) self.graphs['std']['widget'].setLabel('left', '% of Maps Loved') self.graphs['std']['widget'].setLabel('bottom', '% Yes Threshold') self.graphs['taiko']['widget'].setLabel('left', '% of Maps Loved') self.graphs['taiko']['widget'].setLabel('bottom', '% Yes Threshold') self.graphs['catch']['widget'].setLabel('left', '% of Maps Loved') self.graphs['catch']['widget'].setLabel('bottom', '% Yes Threshold') self.graphs['mania']['widget'].setLabel('left', '% of Maps Loved') self.graphs['mania']['widget'].setLabel('bottom', '% Yes Threshold') self.setCentralWidget(self.area)
def setupPlots(self): self.area = DockArea() self.setCentralWidget(self.area) self.plotDict = SequenceDict() # initialize all the plot windows we want plotNames = self.config.get(self.configName+'.PlotNames', ['Plot']) if len(plotNames) < 1: plotNames.append('Plot') if 'Autoload' not in plotNames: plotNames.append('Autoload') for name in plotNames: dock = Dock(name) widget = DateTimePlotWidget(self, name=name) view = widget._graphicsView self.area.addDock(dock, "bottom") dock.addWidget(widget) self.plotDict[name] = {"dock":dock, "widget":widget, "view":view}