Skip to content

Commit 958ac02

Browse files
committed
make offset text bold and larger for matplotlib backend
1 parent c179b58 commit 958ac02

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/silx/gui/plot/backends/BackendMatplotlib.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,23 @@ def __init__(self, plot, parent=None):
540540
self.ax = self.fig.add_axes([0.15, 0.15, 0.75, 0.75], label="left")
541541
self.ax2 = self.ax.twinx()
542542
self.ax2.set_label("right")
543+
544+
xOffsetText = self.ax.xaxis.get_offset_text()
545+
xOffsetText.set_weight("heavy")
546+
xOffsetText.set_fontsize(1.1 * xOffsetText.get_fontsize())
547+
548+
self.ax.yaxis.OFFSETTEXTPAD = 10
549+
yOffsetText = self.ax.yaxis.get_offset_text()
550+
yOffsetText.set_weight("heavy")
551+
yOffsetText.set_fontsize(1.1 * yOffsetText.get_fontsize())
552+
yOffsetText.set_ha("right")
553+
554+
self.ax2.yaxis.OFFSETTEXTPAD = 10
555+
y2OffsetText = self.ax2.yaxis.get_offset_text()
556+
y2OffsetText.set_weight("heavy")
557+
y2OffsetText.set_fontsize(1.1 * y2OffsetText.get_fontsize())
558+
y2OffsetText.set_ha("left")
559+
543560
# Make sure background of Axes is displayed
544561
self.ax2.patch.set_visible(False)
545562
self.ax.patch.set_visible(True)

0 commit comments

Comments
 (0)