Reputation: 427
I have plotted a figure like this
Now I want to move the scientific notation offset 1e4
to the right of the right y axis, best move it to the upper right of 1.8
label.
How can I do this?
Upvotes: 5
Views: 4388
Reputation: 16169
This should work:
t = ax.yaxis.get_offset_text()
t.set_x(1.1)
with ax
your right axis. However, you cannot change the y position, so if you are not satisfied with it, you can hide the offset text and create it manually at the right position (x,y):
ax.yaxis.get_offset_text().set_visible(False)
text(x, y, "1e4")
Upvotes: 8