mirror of https://github.com/m-labs/artiq.git
applets/plot_xy_hist: do not crash when datasets are missing
This commit is contained in:
parent
7661b37c19
commit
8ad151b4d8
|
@ -106,9 +106,12 @@ class XYHistPlot(pyqtgraph.GraphicsWindow):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def data_changed(self, data, mods):
|
def data_changed(self, data, mods):
|
||||||
xs = data[self.args.xs][1]
|
try:
|
||||||
histogram_bins = data[self.args.histogram_bins][1]
|
xs = data[self.args.xs][1]
|
||||||
histograms_counts = data[self.args.histograms_counts][1]
|
histogram_bins = data[self.args.histogram_bins][1]
|
||||||
|
histograms_counts = data[self.args.histograms_counts][1]
|
||||||
|
except KeyError:
|
||||||
|
return
|
||||||
if self._can_use_partial(mods):
|
if self._can_use_partial(mods):
|
||||||
self._set_partial_data(xs, histograms_counts)
|
self._set_partial_data(xs, histograms_counts)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue