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

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

Projects
None yet
2 participants
Owner

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 == '':
Owner

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.

Member

dmcdougall commented Dec 30, 2012

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

Merge pull request #1615 from mdboom/offset-empty
Offset is empty with usetex when offset is equal to 1

@mdboom mdboom merged commit ccd48cb into matplotlib:v1.2.x Feb 25, 2013

1 check passed

default The Travis build passed
Details

@mdboom mdboom deleted the mdboom:offset-empty branch Aug 7, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment