From 57d3a832432d1c4b24f5c273ed539e1a6872c002 Mon Sep 17 00:00:00 2001 From: wendtalexander Date: Thu, 10 Oct 2024 15:11:15 +0200 Subject: [PATCH] [ui/plot] refactoring --- pyrelacs/ui/plots/continously.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyrelacs/ui/plots/continously.py b/pyrelacs/ui/plots/continously.py index 8e48173..c3b1e73 100644 --- a/pyrelacs/ui/plots/continously.py +++ b/pyrelacs/ui/plots/continously.py @@ -14,18 +14,18 @@ class Continously: self.figure = figure self.buffer = buffer - def plot_daq(self, *args, **kwargs): + def plot(self, *args, **kwargs): self.figure.setBackground("w") prev_plot = self.figure.getItem(row=0, col=0) if prev_plot: self.figure.removeItem(prev_plot) - self.continous_plot = self.figure.addPlot(row=0, col=0) + self.continous_ax = self.figure.addPlot(row=0, col=0) pen = pg.mkPen("red") self.time = np.zeros(self.buffer.size) self.data = np.zeros(self.buffer.size) - self.line = self.continous_plot.plot( + self.line = self.continous_ax.plot( self.time, self.data, pen=pen, @@ -40,7 +40,7 @@ class Continously: self.timer.start() def update_plot(self): - log.debug(self.buffer.totalcount()) + # log.debug(self.buffer.totalcount()) if self.buffer.totalcount() > self.CHUNK_PLOT: log.debug(self.buffer.totalcount()) try: @@ -72,4 +72,4 @@ class Continously: self.timer.stop() def refresh(self): - self.continous_plot.enableAutoRange() + self.continous_ax.enableAutoRange()