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

Offset is empty with usetex when offset is equal to 1 #1615

Merged
merged 1 commit into from Feb 25, 2013

Conversation

mdboom
Copy link
Member

@mdboom mdboom commented Feb 11, 2013

Example:

from pylab import *
rc('text',usetex=True)
t=arange(1,1+1e-6,1e-7)
f = lambda x: 1e6*(x-1)
plot(t,vectorize(f)(t))
show()

Missing offset

The problem arises in ScalarFormatter._formatSciNotation; a solution could be replacing

if significand == '1':

with

if significand == '1' and not exponent == '':

@mdboom
Copy link
Member

mdboom commented Dec 20, 2012

Seems like a bonafide bug and a reasonable fix, but I'd like to give others a chance to comment as well.

@dmcdougall
Copy link
Member

Yeah, I agree.

@antoinehu Would you be able to create a pull request against the v1.2.x branch?

mdboom added a commit that referenced this pull request Feb 25, 2013
Offset is empty with usetex when offset is equal to 1
@mdboom mdboom merged commit ccd48cb into matplotlib:v1.2.x Feb 25, 2013
@mdboom mdboom deleted the offset-empty branch August 7, 2014 13:50
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

Successfully merging this pull request may close these issues.

None yet

2 participants