From 29b621e591de3b20b5a7510700a9907ea86e3ce0 Mon Sep 17 00:00:00 2001 From: awe Date: Mon, 8 Jun 2026 18:15:46 +0300 Subject: [PATCH] fix --- rfg_adc_plotter/gui/pyqtgraph_backend.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/rfg_adc_plotter/gui/pyqtgraph_backend.py b/rfg_adc_plotter/gui/pyqtgraph_backend.py index bf28776..25b985f 100644 --- a/rfg_adc_plotter/gui/pyqtgraph_backend.py +++ b/rfg_adc_plotter/gui/pyqtgraph_backend.py @@ -1025,37 +1025,38 @@ def run_pyqtgraph(args) -> None: curve_sec_amp = None curve_sec_phase = None if bin_iq_power_mode: - p_secondary_ch = win.addPlot(row=3, col=0, title="CH1 / CH2 (В)") + p_secondary_ch = win.addPlot(row=3, col=0, colspan=2, title="CH1 / CH2 (В)") p_secondary_ch.showGrid(x=True, y=True, alpha=0.3) - curve_sec_ch1 = p_secondary_ch.plot(pen=pg.mkPen((0, 200, 100), width=1)) - curve_sec_ch2 = p_secondary_ch.plot(pen=pg.mkPen((200, 100, 200), width=1)) + p_secondary_ch.addLegend() + curve_sec_ch1 = p_secondary_ch.plot(pen=pg.mkPen((0, 200, 100), width=1), name="CH1") + curve_sec_ch2 = p_secondary_ch.plot(pen=pg.mkPen((200, 100, 200), width=1), name="CH2") p_secondary_ch.setLabel("bottom", "ГГц") p_secondary_ch.setLabel("left", "В") - p_secondary_ch.addLegend() - curve_sec_ch1.setData([], [], name="CH1") - curve_sec_ch2.setData([], [], name="CH2") + p_secondary_ch.setMinimumHeight(120) try: p_secondary_ch.setXLink(p_line) p_secondary_ch.setVisible(False) except Exception: pass - p_secondary_amp = win.addPlot(row=3, col=1, title="√(CH1² + CH2²) (В)") + p_secondary_amp = win.addPlot(row=4, col=0, colspan=2, title="√(CH1² + CH2²) (В)") p_secondary_amp.showGrid(x=True, y=True, alpha=0.3) curve_sec_amp = p_secondary_amp.plot(pen=pg.mkPen((0, 200, 200), width=1)) p_secondary_amp.setLabel("bottom", "ГГц") p_secondary_amp.setLabel("left", "В") + p_secondary_amp.setMinimumHeight(120) try: p_secondary_amp.setXLink(p_line) p_secondary_amp.setVisible(False) except Exception: pass - p_secondary_phase = win.addPlot(row=4, col=0, title="Фаза atan2(CH2, CH1) (рад)") + p_secondary_phase = win.addPlot(row=5, col=0, colspan=2, title="Фаза atan2(CH2, CH1) (рад)") p_secondary_phase.showGrid(x=True, y=True, alpha=0.3) curve_sec_phase = p_secondary_phase.plot(pen=pg.mkPen((230, 180, 40), width=1)) p_secondary_phase.setLabel("bottom", "ГГц") p_secondary_phase.setLabel("left", "рад") + p_secondary_phase.setMinimumHeight(120) try: p_secondary_phase.setXLink(p_line) p_secondary_phase.setVisible(False)