diff --git a/gui_client.py b/gui_client.py index c73475b..0a371c8 100644 --- a/gui_client.py +++ b/gui_client.py @@ -615,6 +615,7 @@ class PlotTab(QWidget): if pi.legend: pi.legend.clear() + x_min = None for j, key in enumerate(self._traces[i]): if key not in self._series: continue @@ -622,6 +623,7 @@ class PlotTab(QWidget): if not series: continue times, values = zip(*series) + x_min = times[0] if x_min is None else min(x_min, times[0]) label = f"{_trace_label(key)} [{self._units.get(key, '')}]" pw.plot( list(times), list(values), @@ -629,7 +631,7 @@ class PlotTab(QWidget): name=label, ) - pw.setXRange(cutoff, now, padding=0.02) + pw.setXRange(x_min if x_min is not None else cutoff, now, padding=0.02) # ── cursor tracing ────────────────────────────────────────────────────────