forked from M-Labs/artiq
1
0
Fork 0

applets/plot_xy_hist: do not crash when datasets are missing

This commit is contained in:
Sebastien Bourdeauducq 2016-01-13 07:05:30 -07:00
parent 7661b37c19
commit 8ad151b4d8
1 changed files with 6 additions and 3 deletions

View File

@ -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: