fix plots

This commit is contained in:
awe
2026-03-12 16:53:16 +03:00
parent 157447a237
commit 00144a21e6

View File

@ -140,8 +140,6 @@ def run_pyqtgraph(args) -> None:
p_line = win.addPlot(row=0, col=0, title="Сырые данные")
p_line.showGrid(x=True, y=True, alpha=0.3)
curve_avg1 = p_line.plot(pen=pg.mkPen((170, 170, 170), width=1))
curve_avg2 = p_line.plot(pen=pg.mkPen((110, 110, 110), width=1))
curve = p_line.plot(pen=pg.mkPen((80, 120, 255), width=1))
curve_calib = p_line.plot(pen=pg.mkPen((220, 60, 60), width=1))
curve_norm = p_line.plot(pen=pg.mkPen((60, 180, 90), width=1))
@ -707,17 +705,8 @@ def run_pyqtgraph(args) -> None:
if runtime.current_sweep_raw is not None:
curve.setData(xs[: runtime.current_sweep_raw.size], runtime.current_sweep_raw, autoDownsample=True)
if runtime.current_aux_curves is not None:
avg_1_curve, avg_2_curve = runtime.current_aux_curves
curve_avg1.setData(xs[: avg_1_curve.size], avg_1_curve, autoDownsample=True)
curve_avg2.setData(xs[: avg_2_curve.size], avg_2_curve, autoDownsample=True)
else:
curve_avg1.setData([], [])
curve_avg2.setData([], [])
else:
curve.setData([], [])
curve_avg1.setData([], [])
curve_avg2.setData([], [])
if runtime.calib_envelope is not None:
if runtime.current_sweep_raw is not None:
@ -737,8 +726,6 @@ def run_pyqtgraph(args) -> None:
if fixed_ylim is None:
y_series = [runtime.current_sweep_raw, displayed_calib, runtime.current_sweep_norm]
if runtime.current_aux_curves is not None and runtime.current_sweep_raw is not None:
y_series.extend(runtime.current_aux_curves)
y_limits = compute_auto_ylim(*y_series)
if y_limits is not None:
p_line.setYRange(y_limits[0], y_limits[1], padding=0)