You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Applications are open for the 2018 John Hunter Matplotlib Summer Fellowship. Apply now!
Version 2.2.2.post1752+g4b1f956cb
matplotlib
Fork me on GitHub

matplotlib.pyplot.ticklabel_format

matplotlib.pyplot.ticklabel_format(*, axis='both', style='', scilimits=None, useOffset=None, useLocale=None, useMathText=None)[source]

Change the ScalarFormatter used by default for linear axes.

Optional keyword arguments:

Keyword Description
axis [ 'x' | 'y' | 'both' ]
style [ 'sci' (or 'scientific') | 'plain' ] plain turns off scientific notation
scilimits (m, n), pair of integers; if style is 'sci', scientific notation will be used for numbers outside the range 10`m`:sup: to 10`n`:sup:. Use (0,0) to include all numbers. Use (m,m) where m <> 0 to fix the order of magnitude to 10`m`:sup:.
useOffset [ bool | offset ]; if True, the offset will be calculated as needed; if False, no offset will be used; if a numeric offset is specified, it will be used.
useLocale If True, format the number according to the current locale. This affects things such as the character used for the decimal separator. If False, use C-style (English) formatting. The default setting is controlled by the axes.formatter.use_locale rcparam.
useMathText If True, render the offset and scientific notation in mathtext

Only the major ticks are affected. If the method is called when the ScalarFormatter is not the Formatter being used, an AttributeError will be raised.