[Matplotlib-users] How to plot tick values in-place?

Ilja Honkonen ilja.j.honkonen at nasa.gov
Wed Feb 10 13:21:24 EST 2016


> I think setting the rcParam '|axes.formatter.useoffset' |to False prior
> to any plotting would do the trick.|
> |plot.rcParams['axes.formatter.useoffset'] = False

My matplotlib.__version__ == '1.1.1' doesn't have that neither in 
matplotlib nor in plot:

 >>> matplotlib.rcParams['axes.formatter.useoffset'] = False
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/__init__.py", 
line 660, in __setitem__
     See rcParams.keys() for a list of valid parameters.' % (key,))
KeyError: 'axes.formatter.useoffset is not a valid rc parameter.See 
rcParams.keys() for a list of valid parameters.'

 >>> matplotlib.pyplot.rcParams['axes.formatter.useoffset'] = False
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/__init__.py", 
line 660, in __setitem__
     See rcParams.keys() for a list of valid parameters.' % (key,))
KeyError: 'axes.formatter.useoffset is not a valid rc parameter.See 
rcParams.keys() for a list of valid parameters.'

Also I did find this: plot.ticklabel_format(useOffset = False) which 
looks like what you suggest but that only removes offset from ticks not 
scaling. Thanks

Ilja


More information about the Matplotlib-users mailing list