irrad_control/gui/widgets/plot_widgets.py
def _setup_plot(self):
        """Setting up the plot. The Actual plot (self.plt) is the underlying PlotItem of the respective PlotWidget"""

        # Get plot item and setup
        self.plt = self.getPlotItem()
        self.plt.setDownsampling(auto=True)
        self.plt.setLabel('left', text='Signal', units='V' if self.units is None else self.units['left'])

        # Title
        self.plt.setTitle('' if self.name is None else self.name)

        # Additional axis if specified
        if 'right' in self.units:
            self.plt.setLabel('right', text='Signal', units=self.units['right'])

        # X-axis is time
        self.plt.setLabel('bottom', text='Time', units='s')
        self.plt.showGrid(x=True, y=True, alpha=0.66)
        self.plt.setLimits(xMax=0)

        # Make OrderedDict of curves
        self.curves = OrderedDict([(ch, pg.PlotCurveItem(pen=_MPL_COLORS[i % len(_MPL_COLORS)])) for i, ch in enumerate(self.channels)])

        # Make legend entries for curves
        self.legend = pg.LegendItem(offset=(80, -50))
        self.legend.setParentItem(self.plt)

        # Show data and legend
        for ch in self.channels:
            self.show_data(ch)
Setting up the plot. The Actual plot (self.plt) is the underlying PlotItem of the respective PlotWidget
Setting up the plot. The Actual plot (self.plt) is the underlying PlotItem of the respective PlotWidget
Setting up the plot . The Actual plot ( self . plt ) is the underlying PlotItem of the respective PlotWidget
def _setup_plot(self):
        self.plt = self.getPlotItem()
        self.plt.setDownsampling(auto=True)
        self.plt.setLabel('left', text='Signal', units='V' if self.units is None else self.units['left'])
        self.plt.setTitle('' if self.name is None else self.name)
        if 'right' in self.units:
            self.plt.setLabel('right', text='Signal', units=self.units['right'])
        self.plt.setLabel('bottom', text='Time', units='s')
        self.plt.showGrid(x=True, y=True, alpha=0.66)
        self.plt.setLimits(xMax=0)
        self.curves = OrderedDict([(ch, pg.PlotCurveItem(pen=_MPL_COLORS[i % len(_MPL_COLORS)])) for i, ch in enumerate(self.channels)])
        self.legend = pg.LegendItem(offset=(80, -50))
        self.legend.setParentItem(self.plt)
        for ch in self.channels:
            self.show_data(ch)
def _setup_plot ( self ) : self . plt = self . getPlotItem ( ) self . plt . setDownsampling ( auto = True ) self . plt . setLabel ( 'left' , text = 'Signal' , units = 'V' if self . units is None else self . units [ 'left' ] ) self . plt . setTitle ( '' if self . name is None else self . name ) if 'right' in self . units : self . plt . setLabel ( 'right' , text = 'Signal' , units = self . units [ 'right' ] ) self . plt . setLabel ( 'bottom' , text = 'Time' , units = 's' ) self . plt . showGrid ( x = True , y = True , alpha = 0.66 ) self . plt . setLimits ( xMax = 0 ) self . curves = OrderedDict ( [ ( ch , pg . PlotCurveItem ( pen = _MPL_COLORS [ i % len ( _MPL_COLORS ) ] ) ) for i , ch in enumerate ( self . channels ) ] ) self . legend = pg . LegendItem ( offset = ( 80 , - 50 ) ) self . legend . setParentItem ( self . plt ) for ch in self . channels : self . show_data ( ch )
Setting up the plot.
Setting up the plot .
"""Setting up the plot. The Actual plot (self.plt) is the underlying PlotItem of the respective PlotWidget""" # Get plot item and setup # Title # Additional axis if specified # X-axis is time # Make OrderedDict of curves # Make legend entries for curves # Show data and legend
self