forked from M-Labs/artiq
plot_xy: fix missing x values handling
Signed-off-by: Florian Agbuya <fa@m-labs.ph>
This commit is contained in:
parent
a167cc6043
commit
ff79854c46
|
@ -24,11 +24,11 @@ class XYPlot(pyqtgraph.PlotWidget):
|
||||||
y = value[self.args.y]
|
y = value[self.args.y]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return
|
return
|
||||||
x = value.get(self.args.x, (False, None))
|
x = value.get(self.args.x)
|
||||||
if x is None:
|
if x is None:
|
||||||
x = np.arange(len(y))
|
x = np.arange(len(y))
|
||||||
error = value.get(self.args.error, (False, None))
|
error = value.get(self.args.error)
|
||||||
fit = value.get(self.args.fit, (False, None))
|
fit = value.get(self.args.fit)
|
||||||
|
|
||||||
if not len(y) or len(y) != len(x):
|
if not len(y) or len(y) != len(x):
|
||||||
self.mismatch['X values'] = True
|
self.mismatch['X values'] = True
|
||||||
|
|
Loading…
Reference in New Issue