From 4943dc1bd84e89234aaa4b0a41fa7caf826d30b5 Mon Sep 17 00:00:00 2001 From: Valentin Valls Date: Wed, 20 Dec 2023 15:12:28 +0100 Subject: [PATCH] Added bgcolor to the offset --- src/silx/gui/plot/backends/BackendMatplotlib.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/silx/gui/plot/backends/BackendMatplotlib.py b/src/silx/gui/plot/backends/BackendMatplotlib.py index 0e52d824f9..c1f6223068 100755 --- a/src/silx/gui/plot/backends/BackendMatplotlib.py +++ b/src/silx/gui/plot/backends/BackendMatplotlib.py @@ -539,7 +539,10 @@ def __init__(self, plot, parent=None): self.ax = self.fig.add_subplot(label="left") else: self.ax = self.fig.add_axes([0.15, 0.15, 0.75, 0.75], label="left") + self.ax.xaxis.get_offset_text().set_backgroundcolor("yellow") + self.ax.yaxis.get_offset_text().set_backgroundcolor("yellow") self.ax2 = self.ax.twinx() + self.ax2.yaxis.get_offset_text().set_backgroundcolor("yellow") self.ax2.set_label("right") # Make sure background of Axes is displayed self.ax2.patch.set_visible(False)