From b4ceccd6c3e2bea832fb5f0b29f2a28c0c855916 Mon Sep 17 00:00:00 2001 From: erg_samowzbudnik Date: Wed, 2 Jun 2021 20:44:09 +0200 Subject: Bound axes together. --- mplwidget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mplwidget.py b/mplwidget.py index df3a054..cc13600 100644 --- a/mplwidget.py +++ b/mplwidget.py @@ -21,8 +21,8 @@ class MplCanvas(FigureCanvas): self.fig = Figure(tight_layout=True) grid = gridspec.GridSpec(ncols=32, nrows=3) self.ax = self.fig.add_subplot(grid[0, 0:32]) - self.ax_1 = self.fig.add_subplot(grid[1, 0:32]) - self.ax_2 = self.fig.add_subplot(grid[2, 0:32]) + self.ax_1 = self.fig.add_subplot(grid[1, 0:32], sharex=self.ax) + self.ax_2 = self.fig.add_subplot(grid[2, 0:32], sharex=self.ax) self.fig.align_labels() FigureCanvas.__init__(self, self.fig) FigureCanvas.setSizePolicy(self, -- cgit v1.2.3-65-gdbad