Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What else apart from useOffset is controlling tick label offsets? #3512

Closed
michaelaye opened this issue Sep 14, 2014 · 1 comment
Closed

Comments

@michaelaye
Copy link

I was happy to have a new rcParams parameter implemented (#2400) to control the use of the ticker format parameter useOffset.
But I have since discovered another behavior of MPL that seems to ignore this control parameter, possibly to protect axis labels from overwriting each other. Could somebody point out to me what this behavior is called and how to avoid this?
The only difference below is that the second plot uses x-data factor 10 larger than in the first plot.

%matplotlib inline
fig, ax = plt.subplots(2)
ax = ax.flatten()
x = np.linspace(1e6, 1e6+100, 100)
y = np.linspace(5e5, 5e5+100, 100)
ax[0].ticklabel_format(useOffset=False)
ax[0].plot(x,y)
ax[1].ticklabel_format(useOffset=False)
ax[1].plot(x*10,y)

useoffset_prob

I'm posting this here and not in stackoverflow, because it could be a bug of an artist ignoring the useOffset=False instruction, as this looks pretty much like an offset to me.

@tacaswell tacaswell added this to the v1.4.x milestone Sep 14, 2014
@efiring
Copy link
Member

efiring commented Sep 14, 2014

What you are seeing is not an offset, it is a multiplier. To turn it off, use the style kwarg:

plt.ticklabel_format(useOffset=False, style='plain')

@efiring efiring closed this as completed Sep 14, 2014
@efiring efiring removed this from the v1.4.x milestone Sep 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants