forked from M-Labs/artiq
plot_hist: refactor data_changed
This commit is contained in:
parent
b6a83904b5
commit
ac504069d2
@ -15,13 +15,13 @@ class HistogramPlot(pyqtgraph.PlotWidget):
|
||||
self.timer.setSingleShot(True)
|
||||
self.timer.timeout.connect(self.length_warning)
|
||||
|
||||
def data_changed(self, data, mods, title):
|
||||
def data_changed(self, value, metadata, persist, mods, title):
|
||||
try:
|
||||
y = data[self.args.y][1]
|
||||
y = value[self.args.y]
|
||||
if self.args.x is None:
|
||||
x = None
|
||||
else:
|
||||
x = data[self.args.x][1]
|
||||
x = value[self.args.x]
|
||||
except KeyError:
|
||||
return
|
||||
if x is None:
|
||||
|
Loading…
Reference in New Issue
Block a user