From c1ae69f218915ace047213bfdf636b084a62b729 Mon Sep 17 00:00:00 2001 From: atse Date: Wed, 2 Aug 2023 17:32:29 +0800 Subject: [PATCH] Enable axis linking functionality --- pytec/tec_qt.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index 5ea713d..a52b744 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -442,6 +442,9 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): graph.add_crosshair(pg.mkPen(color='red', width=1), {'color': 'green'}) + # Enable linking of axes in the graph widget's context menu + graph.register(graph.getPlotItem().titleLabel.text) # Slight hack getting the title + for graph in self.ch0_t_graph, self.ch1_t_graph: temperature_axis = LiveAxis('left', text="Temperature", units="°C") temperature_axis.showLabel()