79656844

Date: 2025-06-07 10:21:39
Score: 0.5
Natty:
Report link

Based on the answer suggested by jared I was abled to find a workaround.

fig.canvas.draw() #This forces the text to be set

#Replace offset text
for i in range(3):
    offset_text = ax[i].get_yaxis().get_offset_text()
    ax[i].annotate(offset_text.get_text(), xy = (.01, .85), xycoords='axes fraction')
    offset_text.set_visible(False)

This forces the canvas to render, takes the offset text and replaces it with an annotation.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: David K.