-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
Milestone
Description
Consider:
plt.plot(10001 + np.arange(10), 10001 + np.arange(10))
plt.setp(plt.gca().get_yticklabels(), visible=False)
plt.show()
The x
axis is labeled 0..9 + 1.0001e4. I'd suggest changing this to 1..10 + 1.0000e4, which is IMO much more legible.
The y
axis doesn't show the tick labels, as expected, but the offset indicator ("+1.0001e4") is still there. setp(get_{x,y}ticklabels(), visible=False)
is certainly a commonly used approach (e.g. by SubplotBase.label_outer()
).
What I believe the correct solution, which is also set offsetText
(which can be obtained by get_offset_text()
) to invisible, is a bit obscure (and not mentioned in the docs).