forked from M-Labs/artiq
1
0
Fork 0

plot_xy_hist: refactor data_changed

This commit is contained in:
Simon Renblad 2023-07-12 12:05:16 +08:00 committed by Sébastien Bourdeauducq
parent c17f69a51b
commit 6c588b83d7
1 changed files with 4 additions and 4 deletions

View File

@ -124,11 +124,11 @@ class XYHistPlot(QtWidgets.QSplitter):
return False return False
return True return True
def data_changed(self, data, mods): def data_changed(self, value, metadata, persist, mods):
try: try:
xs = data[self.args.xs][1] xs = value[self.args.xs]
histogram_bins = data[self.args.histogram_bins][1] histogram_bins = value[self.args.histogram_bins]
histograms_counts = data[self.args.histograms_counts][1] histograms_counts = value[self.args.histograms_counts]
except KeyError: except KeyError:
return return
if len(xs) != histograms_counts.shape[0]: if len(xs) != histograms_counts.shape[0]: