From 6c588b83d78c53318eff7b26f18f8e6ca0d0009e Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Wed, 12 Jul 2023 12:05:16 +0800 Subject: [PATCH] plot_xy_hist: refactor data_changed --- artiq/applets/plot_xy_hist.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/artiq/applets/plot_xy_hist.py b/artiq/applets/plot_xy_hist.py index 82c06d778..7d42aeacc 100755 --- a/artiq/applets/plot_xy_hist.py +++ b/artiq/applets/plot_xy_hist.py @@ -124,11 +124,11 @@ class XYHistPlot(QtWidgets.QSplitter): return False return True - def data_changed(self, data, mods): + def data_changed(self, value, metadata, persist, mods): try: - xs = data[self.args.xs][1] - histogram_bins = data[self.args.histogram_bins][1] - histograms_counts = data[self.args.histograms_counts][1] + xs = value[self.args.xs] + histogram_bins = value[self.args.histogram_bins] + histograms_counts = value[self.args.histograms_counts] except KeyError: return if len(xs) != histograms_counts.shape[0]: