Odd exponent on plotting narrow range of data
Question: I get a some very odd behaviour of matplotlib in an ipython notebook when
trying to plot this data:

    
    
    [
        -142.8916729, -142.89161936, -142.89161954, -142.89162066,
        -142.89162031, -142.89162033, -142.89162049, -142.89162055,
        -142.89162054, -142.89162084, -142.89162155, -142.89162204,
        -142.89162172, -142.89162157, -142.89162164, -142.89162162,
        -142.89162163, -142.89162165, -142.89162166, -142.89162166,
        -142.89162166, -142.89162167, -142.89162167, -142.89162167,
        -142.89162167, -142.89162167, -142.89162167, -142.89162167,
        -142.89162167, -142.89162167, -142.89162167, -142.89162167,
        -142.89162152
    ]
    

The result is this, notice the exponent:

![Graph with odd exponent](http://i.stack.imgur.com/kWwuN.png)

How can I get rid of this?


Answer: It matplotlib terms, it's called an offset, rather than an exponent. (For
easier searching in the future.)

By default, matplotlib assumes that you want to display the data ranges as
compactly as possible, so it will include offsets and/or multipliers to make
the display a bit more compactly (notice the `-` instead of an `x`.)

If you don't want your plot to be displayed this way, the easiest way to
remove it is to use `plt.ticklabel_format(useOffset=False)` (You'll have to
overlook the camelCase.)

As a quick example:

    
    
    import matplotlib.pyplot as plt
    import numpy as np
    
    x = np.array([-142.8916729, -142.89161936, -142.89161954, -142.89162066,
                  -142.89162031, -142.89162033, -142.89162049, -142.89162055,
                  -142.89162054, -142.89162084, -142.89162155, -142.89162204,
                  -142.89162172, -142.89162157, -142.89162164, -142.89162162,
                  -142.89162163, -142.89162165, -142.89162166, -142.89162166,
                  -142.89162166, -142.89162167, -142.89162167, -142.89162167,
                  -142.89162167, -142.89162167, -142.89162167, -142.89162167,
                  -142.89162167, -142.89162167, -142.89162167, -142.89162167,
                  -142.89162152])
    fig, ax = plt.subplots()
    ax.plot(x)
    ax.ticklabel_format(useOffset=False)
    plt.show()
    

![enter image description here](http://i.stack.imgur.com/ANiyg.png)

