I would like to move the offset text in matplotlib from above the y-axis to besides the y-axis. The following code
import matplotlib.pyplot as plt
fig,ax = plt.subplots()
ax.plot([0,1],[0,1e-6],'o-')
ax.yaxis.set_offset_position('left')
ax.set_xlabel('$x$')
ax.set_ylabel('$y$')
plt.show()
I am aware of this command
ax.yaxis.set_offset_position('left')
However, it only accepts an option of "left" or "right". Does anyone know how to move the offset text to the position as in the following figure?