forked from M-Labs/artiq
1
0
Fork 0

plot_hist: refactor data_changed

This commit is contained in:
Simon Renblad 2023-07-12 12:04:22 +08:00 committed by Sébastien Bourdeauducq
parent b6a83904b5
commit ac504069d2
1 changed files with 3 additions and 3 deletions

View File

@ -15,13 +15,13 @@ class HistogramPlot(pyqtgraph.PlotWidget):
self.timer.setSingleShot(True) self.timer.setSingleShot(True)
self.timer.timeout.connect(self.length_warning) self.timer.timeout.connect(self.length_warning)
def data_changed(self, data, mods, title): def data_changed(self, value, metadata, persist, mods, title):
try: try:
y = data[self.args.y][1] y = value[self.args.y]
if self.args.x is None: if self.args.x is None:
x = None x = None
else: else:
x = data[self.args.x][1] x = value[self.args.x]
except KeyError: except KeyError:
return return
if x is None: if x is None: