This commit is contained in:
atse 2023-08-24 12:33:41 +08:00
parent 6bca8a2728
commit 19ffc160e3
1 changed files with 5 additions and 4 deletions

View File

@ -218,11 +218,11 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
self._set_param_tree() self._set_param_tree()
self.ch0_t_plot = LiveLinePlot() self.ch0_t_plot = LiveLinePlot()
self.ch0_i_plot = LiveLinePlot() self.ch0_i_plot = LiveLinePlot(name='Feedback')
self.ch0_iset_plot = LiveLinePlot(pen=pg.mkPen('r')) self.ch0_iset_plot = LiveLinePlot(name='Setpoint', pen=pg.mkPen('r'))
self.ch1_t_plot = LiveLinePlot() self.ch1_t_plot = LiveLinePlot()
self.ch1_i_plot = LiveLinePlot() self.ch1_i_plot = LiveLinePlot(name='Feedback')
self.ch1_iset_plot = LiveLinePlot(pen=pg.mkPen('r')) self.ch1_iset_plot = LiveLinePlot(name='Setpoint', pen=pg.mkPen('r'))
self.ch0_t_line = self.ch0_t_graph.getPlotItem().addLine(label='{value} °C') self.ch0_t_line = self.ch0_t_graph.getPlotItem().addLine(label='{value} °C')
self.ch0_t_line.setVisible(False) self.ch0_t_line.setVisible(False)
@ -484,6 +484,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
current_axis = LiveAxis('left', text="Current", units="A") current_axis = LiveAxis('left', text="Current", units="A")
current_axis.showLabel() current_axis.showLabel()
graph.setAxisItems({'left': current_axis}) graph.setAxisItems({'left': current_axis})
graph.addLegend(brush=(50, 50, 200, 150))
self.ch0_t_graph.addItem(self.ch0_t_plot) self.ch0_t_graph.addItem(self.ch0_t_plot)
self.ch0_i_graph.addItem(self.ch0_i_plot) self.ch0_i_graph.addItem(self.ch0_i_plot)