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.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:
|
||||||
|
|
Loading…
Reference in New Issue