You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
<divid="unreleased-message"> You are reading an old version of the documentation (v3.2.1). For the latest version see <ahref="https://matplotlib.org/stable/api/ticker_api.html">https://matplotlib.org/stable/api/ticker_api.html</a></div>
<divid="annc-banner">
<p>John Hunter Excellence in Plotting Contest 2020
<ahref="https://jhepc.github.io/about.html"> submissions are open!
<spanid="matplotlib-ticker"></span><h1><codeclass="docutils literal notranslate"><spanclass="pre">matplotlib.ticker</span></code><aclass="headerlink" href="#module-matplotlib.ticker" title="Permalink to this headline">¶</a></h1>
<p>set the rcParam <codeclass="docutils literal notranslate"><spanclass="pre">axes.formatter.useoffset=False</span></code> to turn it off
globally, or set a different formatter.</p>
</div>
<divclass="section" id="tick-locating">
<h3>Tick locating<aclass="headerlink" href="#tick-locating" title="Permalink to this headline">¶</a></h3>
<p>The Locator class is the base class for all tick locators. The locators
handle autoscaling of the view limits based on the data limits, and the
choosing of tick locations. A useful semi-automatic tick locator is
<aclass="reference internal" href="#matplotlib.ticker.MultipleLocator" title="matplotlib.ticker.MultipleLocator"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">MultipleLocator</span></code></a>. It is initialized with a base, e.g., 10, and it picks
axis limits and ticks that are multiples of that base.</p>
<p>The Locator subclasses defined here are</p>
<dlclass="docutils">
<dt><aclass="reference internal" href="#matplotlib.ticker.AutoLocator" title="matplotlib.ticker.AutoLocator"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">AutoLocator</span></code></a></dt><dd><aclass="reference internal" href="#matplotlib.ticker.MaxNLocator" title="matplotlib.ticker.MaxNLocator"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">MaxNLocator</span></code></a> with simple defaults. This is the default tick locator for
most plotting.</dd>
<dt><aclass="reference internal" href="#matplotlib.ticker.MaxNLocator" title="matplotlib.ticker.MaxNLocator"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">MaxNLocator</span></code></a></dt><dd>Finds up to a max number of intervals with ticks at nice locations.</dd>
<dt><aclass="reference internal" href="#matplotlib.ticker.LinearLocator" title="matplotlib.ticker.LinearLocator"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">LinearLocator</span></code></a></dt><dd>Space ticks evenly from min to max.</dd>
<dt><aclass="reference internal" href="#matplotlib.ticker.LogLocator" title="matplotlib.ticker.LogLocator"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">LogLocator</span></code></a></dt><dd>Space ticks logarithmically from min to max.</dd>
<dt><aclass="reference internal" href="#matplotlib.ticker.MultipleLocator" title="matplotlib.ticker.MultipleLocator"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">MultipleLocator</span></code></a></dt><dd>Ticks and range are a multiple of base; either integer or float.</dd>
<dt><aclass="reference internal" href="#matplotlib.ticker.SymmetricalLogLocator" title="matplotlib.ticker.SymmetricalLogLocator"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">SymmetricalLogLocator</span></code></a></dt><dd>Locator for use with with the symlog norm; works like <aclass="reference internal" href="#matplotlib.ticker.LogLocator" title="matplotlib.ticker.LogLocator"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">LogLocator</span></code></a> for the
part outside of the threshold and adds 0 if inside the limits.</dd>
<dt><aclass="reference internal" href="#matplotlib.ticker.OldAutoLocator" title="matplotlib.ticker.OldAutoLocator"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">OldAutoLocator</span></code></a></dt><dd>Choose a <aclass="reference internal" href="#matplotlib.ticker.MultipleLocator" title="matplotlib.ticker.MultipleLocator"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">MultipleLocator</span></code></a> and dynamically reassign it for intelligent
ticking during navigation.</dd>
<dt><aclass="reference internal" href="#matplotlib.ticker.AutoMinorLocator" title="matplotlib.ticker.AutoMinorLocator"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">AutoMinorLocator</span></code></a></dt><dd>Locator for minor ticks when the axis is linear and the
major ticks are uniformly spaced. Subdivides the major
tick interval into a specified number of minor intervals,
defaulting to 4 or 5 depending on the major interval.</dd>
</dl>
<p>There are a number of locators specialized for date locations - see
the <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">dates</span></code> module.</p>
<p>You can define your own locator by deriving from Locator. You must
override the <codeclass="docutils literal notranslate"><spanclass="pre">__call__</span></code> method, which returns a sequence of locations,
and you will probably want to override the autoscale method to set the
view limits from the data limits.</p>
<p>If you want to override the default locator, use one of the above or a custom
locator and pass it to the x or y axis instance. The relevant methods are:</p>
<p>The default minor locator is <aclass="reference internal" href="#matplotlib.ticker.NullLocator" title="matplotlib.ticker.NullLocator"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">NullLocator</span></code></a>, i.e., no minor ticks on by default.</p>
</div>
<divclass="section" id="tick-formatting">
<h3>Tick formatting<aclass="headerlink" href="#tick-formatting" title="Permalink to this headline">¶</a></h3>
<p>Tick formatting is controlled by classes derived from Formatter. The formatter
operates on a single tick value and returns a string to the axis.</p>
<dlclass="docutils">
<dt><aclass="reference internal" href="#matplotlib.ticker.NullFormatter" title="matplotlib.ticker.NullFormatter"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">NullFormatter</span></code></a></dt><dd>No labels on the ticks.</dd>
<dt><aclass="reference internal" href="#matplotlib.ticker.IndexFormatter" title="matplotlib.ticker.IndexFormatter"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">IndexFormatter</span></code></a></dt><dd>Set the strings from a list of labels.</dd>
<dt><aclass="reference internal" href="#matplotlib.ticker.FixedFormatter" title="matplotlib.ticker.FixedFormatter"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">FixedFormatter</span></code></a></dt><dd>Set the strings manually for the labels.</dd>
<dt><aclass="reference internal" href="#matplotlib.ticker.FuncFormatter" title="matplotlib.ticker.FuncFormatter"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">FuncFormatter</span></code></a></dt><dd>User defined function sets the labels.</dd>
<p>See <aclass="reference internal" href="../gallery/ticks_and_spines/major_minor_demo.html"><spanclass="doc">Major and minor ticks</span></a> for an
example of setting major and minor ticks. See the <aclass="reference internal" href="dates_api.html#module-matplotlib.dates" title="matplotlib.dates"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">matplotlib.dates</span></code></a>
module for more information and examples of using date locators and formatters.</p>
<dlclass="py class">
<dtid="matplotlib.ticker.TickHelper">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">TickHelper</code><aclass="reference internal" href="../_modules/matplotlib/ticker.html#TickHelper"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.TickHelper" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">axis</code><emclass="property"> = None</em><aclass="headerlink" href="#matplotlib.ticker.TickHelper.axis" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">create_dummy_axis</code><spanclass="sig-paren">(</span><em>self</em>, <em>\*\*kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#TickHelper.create_dummy_axis"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.TickHelper.create_dummy_axis" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.TickHelper.set_axis">
<codeclass="descname">set_axis</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">axis</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#TickHelper.set_axis"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.TickHelper.set_axis" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.TickHelper.set_bounds">
<codeclass="descname">set_bounds</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">vmin</span></em>, <em><spanclass="n">vmax</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#TickHelper.set_bounds"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.TickHelper.set_bounds" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_data_interval</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">vmin</span></em>, <em><spanclass="n">vmax</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#TickHelper.set_data_interval"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.TickHelper.set_data_interval" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_view_interval</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">vmin</span></em>, <em><spanclass="n">vmax</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#TickHelper.set_view_interval"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.TickHelper.set_view_interval" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.Formatter">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">Formatter</code><aclass="reference internal" href="../_modules/matplotlib/ticker.html#Formatter"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Formatter" title="Permalink to this definition">¶</a></dt>
<p>Create a string based on a tick value and location.</p>
<dlclass="py method">
<dtid="matplotlib.ticker.Formatter.fix_minus">
<codeclass="descname">fix_minus</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">s</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#Formatter.fix_minus"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Formatter.fix_minus" title="Permalink to this definition">¶</a></dt>
<dd><p>Some classes may want to replace a hyphen for minus with the
proper unicode symbol (U+2212) for typographical correctness.
The default is to not replace it.</p>
<p>Note, if you use this method, e.g., in <aclass="reference internal" href="#matplotlib.ticker.Formatter.format_data" title="matplotlib.ticker.Formatter.format_data"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">format_data()</span></code></a> or
call, you probably don't want to use it for
<aclass="reference internal" href="#matplotlib.ticker.Formatter.format_data_short" title="matplotlib.ticker.Formatter.format_data_short"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">format_data_short()</span></code></a> since the toolbar uses this for
interactive coord reporting and I doubt we can expect GUIs
across platforms will handle the unicode correctly. So for
now the classes that override <aclass="reference internal" href="#matplotlib.ticker.Formatter.fix_minus" title="matplotlib.ticker.Formatter.fix_minus"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">fix_minus()</span></code></a> should have an
<codeclass="descname">format_data</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">value</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#Formatter.format_data"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Formatter.format_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the full string representation of the value with the
<codeclass="descname">format_data_short</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">value</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#Formatter.format_data_short"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Formatter.format_data_short" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a short string version of the tick value.</p>
<p>Defaults to the position-independent long value.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.Formatter.format_ticks">
<codeclass="descname">format_ticks</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">values</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#Formatter.format_ticks"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Formatter.format_ticks" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the tick labels for all the ticks at once.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.Formatter.get_offset">
<codeclass="descname">get_offset</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#Formatter.get_offset"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Formatter.get_offset" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py attribute">
<dtid="matplotlib.ticker.Formatter.locs">
<codeclass="descname">locs</code><emclass="property"> = []</em><aclass="headerlink" href="#matplotlib.ticker.Formatter.locs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.Formatter.set_locs">
<codeclass="descname">set_locs</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">locs</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#Formatter.set_locs"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Formatter.set_locs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.FixedFormatter">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">FixedFormatter</code><spanclass="sig-paren">(</span><em><spanclass="n">seq</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#FixedFormatter"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.FixedFormatter" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_offset</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#FixedFormatter.get_offset"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.FixedFormatter.get_offset" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_offset_string</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">ofs</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#FixedFormatter.set_offset_string"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.FixedFormatter.set_offset_string" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.NullFormatter">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">NullFormatter</code><aclass="reference internal" href="../_modules/matplotlib/ticker.html#NullFormatter"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.NullFormatter" title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">FuncFormatter</code><spanclass="sig-paren">(</span><em><spanclass="n">func</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#FuncFormatter"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.FuncFormatter" title="Permalink to this definition">¶</a></dt>
<p>Use a user-defined function for formatting.</p>
<p>The function should take in two inputs (a tick value <codeclass="docutils literal notranslate"><spanclass="pre">x</span></code> and a
position <codeclass="docutils literal notranslate"><spanclass="pre">pos</span></code>), and return a string containing the corresponding
tick label.</p>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.FormatStrFormatter">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">FormatStrFormatter</code><spanclass="sig-paren">(</span><em><spanclass="n">fmt</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#FormatStrFormatter"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.FormatStrFormatter" title="Permalink to this definition">¶</a></dt>
<p>Use an old-style ('%' operator) format string to format the tick.</p>
<p>The format string should have a single variable format (%) in it.
It will be applied to the value (not the position) of the tick.</p>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.StrMethodFormatter">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">StrMethodFormatter</code><spanclass="sig-paren">(</span><em><spanclass="n">fmt</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#StrMethodFormatter"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.StrMethodFormatter" title="Permalink to this definition">¶</a></dt>
<p>Tick value is interpreted as a plain old number. If
<codeclass="docutils literal notranslate"><spanclass="pre">useOffset==True</span></code> and the data range is much smaller than the data
average, then an offset will be determined such that the tick labels
are meaningful. Scientific notation is used for <codeclass="docutils literal notranslate"><spanclass="pre">data</span><spanclass="pre"><</span><spanclass="pre">10^-n</span></code> or
<codeclass="docutils literal notranslate"><spanclass="pre">data</span><spanclass="pre">>=</span><spanclass="pre">10^m</span></code>, where <codeclass="docutils literal notranslate"><spanclass="pre">n</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">m</span></code> are the power limits set
using <codeclass="docutils literal notranslate"><spanclass="pre">set_powerlimits((n,</span><spanclass="pre">m))</span></code>. The defaults for these are
controlled by the <codeclass="docutils literal notranslate"><spanclass="pre">axes.formatter.limits</span></code> rc parameter.</p>
<codeclass="descname">fix_minus</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">s</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#ScalarFormatter.fix_minus"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.fix_minus" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">format_data</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">value</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#ScalarFormatter.format_data"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.format_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a formatted string representation of a number.</p>
<codeclass="descname">format_data_short</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">value</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#ScalarFormatter.format_data_short"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.format_data_short" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a short formatted string representation of a number.</p>
<codeclass="descname">get_offset</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#ScalarFormatter.get_offset"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.get_offset" title="Permalink to this definition">¶</a></dt>
<dd><p>Return scientific notation, plus offset.</p>
<codeclass="descname">get_useLocale</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#ScalarFormatter.get_useLocale"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.get_useLocale" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_useMathText</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#ScalarFormatter.get_useMathText"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.get_useMathText" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_useOffset</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#ScalarFormatter.get_useOffset"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.get_useOffset" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">pprint_val</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">x</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#ScalarFormatter.pprint_val"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.pprint_val" title="Permalink to this definition">¶</a></dt>
<dd><p>[<em>Deprecated</em>]</p>
<pclass="rubric">Notes</p>
<divclass="deprecated">
<p><spanclass="versionmodified deprecated">Deprecated since version 3.1: </span></p>
<codeclass="descname">set_locs</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">locs</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#ScalarFormatter.set_locs"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.set_locs" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_powerlimits</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">lims</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#ScalarFormatter.set_powerlimits"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.set_powerlimits" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets size thresholds for scientific notation.</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>lims</strong><spanclass="classifier">(min_exp, max_exp)</span></dt><dd><p>A tuple containing the powers of 10 that determine the switchover
<p>For example, <codeclass="docutils literal notranslate"><spanclass="pre">formatter.set_powerlimits((-3,</span><spanclass="pre">4))</span></code> sets the
pre-2007 default in which scientific notation is used for
<codeclass="descname">set_scientific</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">b</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#ScalarFormatter.set_scientific"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.set_scientific" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_useLocale</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">val</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#ScalarFormatter.set_useLocale"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.set_useLocale" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_useMathText</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">val</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#ScalarFormatter.set_useMathText"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.set_useMathText" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_useOffset</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">val</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#ScalarFormatter.set_useOffset"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.set_useOffset" title="Permalink to this definition">¶</a></dt>
<emclass="property">property </em><codeclass="descname">useLocale</code><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.useLocale" title="Permalink to this definition">¶</a></dt>
<emclass="property">property </em><codeclass="descname">useMathText</code><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.useMathText" title="Permalink to this definition">¶</a></dt>
<emclass="property">property </em><codeclass="descname">useOffset</code><aclass="headerlink" href="#matplotlib.ticker.ScalarFormatter.useOffset" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.LogFormatter">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">LogFormatter</code><spanclass="sig-paren">(</span><em><spanclass="n">base</span><spanclass="o">=</span><spanclass="default_value">10.0</span></em>, <em><spanclass="n">labelOnlyBase</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <em><spanclass="n">minor_thresholds</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">linthresh</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogFormatter"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogFormatter" title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>base</strong><spanclass="classifier">float, optional, default: 10.</span></dt><dd><p>Base of the logarithm used in all calculations.</p>
</dd>
<dt><strong>labelOnlyBase</strong><spanclass="classifier">bool, optional, default: False</span></dt><dd><p>If True, label ticks only at integer powers of base.
This is normally True for major ticks and False for
minor ticks.</p>
</dd>
<dt><strong>minor_thresholds</strong><spanclass="classifier">(subset, all), optional, default: (1, 0.4)</span></dt><dd><p>If labelOnlyBase is False, these two numbers control
the labeling of ticks that are not at integer powers of
base; normally these are the minor ticks. The controlling
parameter is the log of the axis data range. In the typical
case where base is 10 it is the number of decades spanned
by the axis, so we can call it 'numdec'. If <codeclass="docutils literal notranslate"><spanclass="pre">numdec</span><spanclass="pre"><=</span><spanclass="pre">all</span></code>,
all minor ticks will be labeled. If <codeclass="docutils literal notranslate"><spanclass="pre">all</span><spanclass="pre"><</span><spanclass="pre">numdec</span><spanclass="pre"><=</span><spanclass="pre">subset</span></code>,
then only a subset of minor ticks will be labeled, so as to
avoid crowding. If <codeclass="docutils literal notranslate"><spanclass="pre">numdec</span><spanclass="pre">></span><spanclass="pre">subset</span></code> then no minor ticks will
be labeled.</p>
</dd>
<dt><strong>linthresh</strong><spanclass="classifier">None or float, optional, default: None</span></dt><dd><p>If a symmetric log scale is in use, its <codeclass="docutils literal notranslate"><spanclass="pre">linthresh</span></code>
parameter must be supplied here.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<pclass="rubric">Notes</p>
<p>The <aclass="reference internal" href="#matplotlib.ticker.LogFormatter.set_locs" title="matplotlib.ticker.LogFormatter.set_locs"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">set_locs</span></code></a> method must be called to enable the subsetting
logic controlled by the <codeclass="docutils literal notranslate"><spanclass="pre">minor_thresholds</span></code> parameter.</p>
<p>In some cases such as the colorbar, there is no distinction between
major and minor ticks; the tick locations might be set manually,
or by a locator that puts ticks at integer powers of base and
at intermediate locations. For this situation, disable the
minor_thresholds logic by using <codeclass="docutils literal notranslate"><spanclass="pre">minor_thresholds=(np.inf,</span><spanclass="pre">np.inf)</span></code>,
so that all ticks will be labeled.</p>
<p>To disable labeling of minor ticks when 'labelOnlyBase' is False,
use <codeclass="docutils literal notranslate"><spanclass="pre">minor_thresholds=(0,</span><spanclass="pre">0)</span></code>. This is the default for the
"classic" style.</p>
<pclass="rubric">Examples</p>
<p>To label a subset of minor ticks when the view limits span up
to 2 decades, and all of the ticks when zoomed in to 0.5 decades
or less, use <codeclass="docutils literal notranslate"><spanclass="pre">minor_thresholds=(2,</span><spanclass="pre">0.5)</span></code>.</p>
<p>To label all minor ticks when the view limits span up to 1.5
decades, use <codeclass="docutils literal notranslate"><spanclass="pre">minor_thresholds=(1.5,</span><spanclass="pre">1.5)</span></code>.</p>
<dlclass="py method">
<dtid="matplotlib.ticker.LogFormatter.base">
<codeclass="descname">base</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">base</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogFormatter.base"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogFormatter.base" title="Permalink to this definition">¶</a></dt>
<dd><p>Change the <em>base</em> for labeling.</p>
<divclass="admonition warning">
<pclass="first admonition-title">Warning</p>
<pclass="last">Should always match the base used for <aclass="reference internal" href="#matplotlib.ticker.LogLocator" title="matplotlib.ticker.LogLocator"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">LogLocator</span></code></a></p>
<codeclass="descname">format_data</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">value</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogFormatter.format_data"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogFormatter.format_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the full string representation of the value with the
<codeclass="descname">format_data_short</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">value</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogFormatter.format_data_short"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogFormatter.format_data_short" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a short formatted string representation of a number.</p>
<codeclass="descname">label_minor</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">labelOnlyBase</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogFormatter.label_minor"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogFormatter.label_minor" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">pprint_val</code><spanclass="sig-paren">(</span><em>self</em>, <em>\*args</em>, <em>\*\*kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogFormatter.pprint_val"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogFormatter.pprint_val" title="Permalink to this definition">¶</a></dt>
<dd><p>[<em>Deprecated</em>]</p>
<pclass="rubric">Notes</p>
<divclass="deprecated">
<p><spanclass="versionmodified deprecated">Deprecated since version 3.1: </span></p>
</div>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.LogFormatter.set_locs">
<codeclass="descname">set_locs</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">locs</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogFormatter.set_locs"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogFormatter.set_locs" title="Permalink to this definition">¶</a></dt>
<dd><p>Use axis view limits to control which ticks are labeled.</p>
<p>The <em>locs</em> parameter is ignored in the present algorithm.</p>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.LogFormatterExponent">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">LogFormatterExponent</code><spanclass="sig-paren">(</span><em><spanclass="n">base</span><spanclass="o">=</span><spanclass="default_value">10.0</span></em>, <em><spanclass="n">labelOnlyBase</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <em><spanclass="n">minor_thresholds</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">linthresh</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogFormatterExponent"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogFormatterExponent" title="Permalink to this definition">¶</a></dt>
<p>Format values for log axis using <codeclass="docutils literal notranslate"><spanclass="pre">exponent</span><spanclass="pre">=</span><spanclass="pre">log_base(value)</span></code>.</p>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.LogFormatterMathtext">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">LogFormatterMathtext</code><spanclass="sig-paren">(</span><em><spanclass="n">base</span><spanclass="o">=</span><spanclass="default_value">10.0</span></em>, <em><spanclass="n">labelOnlyBase</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <em><spanclass="n">minor_thresholds</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">linthresh</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogFormatterMathtext"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogFormatterMathtext" title="Permalink to this definition">¶</a></dt>
<p>Format values for log axis using <codeclass="docutils literal notranslate"><spanclass="pre">exponent</span><spanclass="pre">=</span><spanclass="pre">log_base(value)</span></code>.</p>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.IndexFormatter">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">IndexFormatter</code><spanclass="sig-paren">(</span><em><spanclass="n">labels</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#IndexFormatter"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.IndexFormatter" title="Permalink to this definition">¶</a></dt>
<p>Format the position x to the nearest i-th label where <codeclass="docutils literal notranslate"><spanclass="pre">i</span><spanclass="pre">=</span><spanclass="pre">int(x</span><spanclass="pre">+</span><spanclass="pre">0.5)</span></code>.
Positions where <codeclass="docutils literal notranslate"><spanclass="pre">i</span><spanclass="pre"><</span><spanclass="pre">0</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">i</span><spanclass="pre">></span><spanclass="pre">len(list)</span></code> have no tick labels.</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>use_overline</strong><spanclass="classifier">bool, default: False</span></dt><dd><p>If x > 1/2, with x = 1-v, indicate if x should be displayed as
$overline{v}$. The default is to display $1-v$.</p>
</dd>
<dt><strong>one_half</strong><spanclass="classifier">str, default: r"frac{1}{2}"</span></dt><dd><p>The string used to represent 1/2.</p>
</dd>
<dt><strong>minor</strong><spanclass="classifier">bool, default: False</span></dt><dd><p>Indicate if the formatter is formatting minor ticks or not.
Basically minor ticks are not labelled, except when only few ticks
are provided, ticks with most space with neighbor ticks are
labelled. See other parameters to change the default behavior.</p>
</dd>
<dt><strong>minor_threshold</strong><spanclass="classifier">int, default: 25</span></dt><dd><p>Maximum number of locs for labelling some minor ticks. This
parameter have no effect if minor is False.</p>
</dd>
<dt><strong>minor_number</strong><spanclass="classifier">int, default: 6</span></dt><dd><p>Number of ticks which are labelled when the number of ticks is
<codeclass="descname">format_data_short</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">value</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogitFormatter.format_data_short"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogitFormatter.format_data_short" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a short formatted string representation of a number.</p>
<codeclass="descname">set_locs</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">locs</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogitFormatter.set_locs"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogitFormatter.set_locs" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_minor_number</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">minor_number</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogitFormatter.set_minor_number"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogitFormatter.set_minor_number" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the number of minor ticks to label when some minor ticks are
<codeclass="descname">set_minor_threshold</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">minor_threshold</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogitFormatter.set_minor_threshold"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogitFormatter.set_minor_threshold" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the threshold for labelling minors ticks.</p>
<codeclass="descname">set_one_half</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">one_half</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogitFormatter.set_one_half"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogitFormatter.set_one_half" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the way one half is displayed.</p>
<dlclass="docutils">
<dt>one_half<spanclass="classifier">str, default: r"frac{1}{2}"</span></dt><dd>The string used to represent 1/2.</dd>
<codeclass="descname">use_overline</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">use_overline</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogitFormatter.use_overline"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogitFormatter.use_overline" title="Permalink to this definition">¶</a></dt>
<dd><p>Switch display mode with overline for labelling p>1/2.</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>use_overline</strong><spanclass="classifier">bool, default: False</span></dt><dd><p>If x > 1/2, with x = 1-v, indicate if x should be displayed as
$overline{v}$. The default is to display $1-v$.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.EngFormatter">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">EngFormatter</code><spanclass="sig-paren">(</span><em><spanclass="n">unit</span><spanclass="o">=</span><spanclass="default_value">''</span></em>, <em><spanclass="n">places</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">sep</span><spanclass="o">=</span><spanclass="default_value">' '</span></em>, <em><spanclass="o">*</span></em>, <em><spanclass="n">usetex</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">useMathText</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#EngFormatter"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.EngFormatter" title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>unit</strong><spanclass="classifier">str (default: "")</span></dt><dd><p>Unit symbol to use, suitable for use with single-letter
representations of powers of 1000. For example, 'Hz' or 'm'.</p>
</dd>
<dt><strong>places</strong><spanclass="classifier">int (default: None)</span></dt><dd><p>Precision with which to display the number, specified in
digits after the decimal point (there will be between one
and three digits before the decimal point). If it is None,
the formatting falls back to the floating point format '%g',
which displays up to 6 <em>significant</em> digits, i.e. the equivalent
value for <em>places</em> varies between 0 and 5 (inclusive).</p>
</dd>
<dt><strong>sep</strong><spanclass="classifier">str (default: " ")</span></dt><dd><p>Separator used between the value and the prefix/unit. For
example, one get '3.14 mV' if <codeclass="docutils literal notranslate"><spanclass="pre">sep</span></code> is " " (default) and
'3.14mV' if <codeclass="docutils literal notranslate"><spanclass="pre">sep</span></code> is "". Besides the default behavior, some
other useful options may be:</p>
<ulclass="simple">
<li><codeclass="docutils literal notranslate"><spanclass="pre">sep=""</span></code> to append directly the prefix/unit to the value;</li>
<dt><strong>usetex</strong><spanclass="classifier">bool (default: None)</span></dt><dd><p>To enable/disable the use of TeX's math mode for rendering the
numbers in the formatter.</p>
</dd>
<dt><strong>useMathText</strong><spanclass="classifier">bool (default: None)</span></dt><dd><p>To enable/disable the use mathtext for rendering the numbers in
<codeclass="descname">fix_minus</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">s</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#EngFormatter.fix_minus"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.EngFormatter.fix_minus" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">format_eng</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">num</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#EngFormatter.format_eng"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.EngFormatter.format_eng" title="Permalink to this definition">¶</a></dt>
<dd><p>Formats a number in engineering notation, appending a letter
representing the power of 1000 of the original number.
Some examples:</p>
<divclass="doctest highlight-default notranslate"><divclass="highlight"><pre><span></span><spanclass="gp">>>> </span><spanclass="n">format_eng</span><spanclass="p">(</span><spanclass="mi">0</span><spanclass="p">)</span><spanclass="c1"># for self.places = 0</span>
<spanclass="go">'0'</span>
</pre></div>
</div>
<divclass="doctest highlight-default notranslate"><divclass="highlight"><pre><span></span><spanclass="gp">>>> </span><spanclass="n">format_eng</span><spanclass="p">(</span><spanclass="mi">1000000</span><spanclass="p">)</span><spanclass="c1"># for self.places = 1</span>
<spanclass="go">'1.0 M'</span>
</pre></div>
</div>
<divclass="doctest highlight-default notranslate"><divclass="highlight"><pre><span></span><spanclass="gp">>>> </span><spanclass="n">format_eng</span><spanclass="p">(</span><spanclass="s2">"-1e-6"</span><spanclass="p">)</span><spanclass="c1"># for self.places = 2</span>
<codeclass="descname">get_useMathText</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#EngFormatter.get_useMathText"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.EngFormatter.get_useMathText" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_usetex</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#EngFormatter.get_usetex"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.EngFormatter.get_usetex" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_useMathText</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">val</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#EngFormatter.set_useMathText"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.EngFormatter.set_useMathText" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_usetex</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">val</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#EngFormatter.set_usetex"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.EngFormatter.set_usetex" title="Permalink to this definition">¶</a></dt>
<emclass="property">property </em><codeclass="descname">useMathText</code><aclass="headerlink" href="#matplotlib.ticker.EngFormatter.useMathText" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.EngFormatter.usetex">
<emclass="property">property </em><codeclass="descname">usetex</code><aclass="headerlink" href="#matplotlib.ticker.EngFormatter.usetex" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.PercentFormatter">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">PercentFormatter</code><spanclass="sig-paren">(</span><em><spanclass="n">xmax</span><spanclass="o">=</span><spanclass="default_value">100</span></em>, <em><spanclass="n">decimals</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">symbol</span><spanclass="o">=</span><spanclass="default_value">'%'</span></em>, <em><spanclass="n">is_latex</span><spanclass="o">=</span><spanclass="default_value">False</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#PercentFormatter"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.PercentFormatter" title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>xmax</strong><spanclass="classifier">float</span></dt><dd><p>Determines how the number is converted into a percentage.
<em>xmax</em> is the data value that corresponds to 100%.
Percentages are computed as <codeclass="docutils literal notranslate"><spanclass="pre">x</span><spanclass="pre">/</span><spanclass="pre">xmax</span><spanclass="pre">*</span><spanclass="pre">100</span></code>. So if the data is
already scaled to be percentages, <em>xmax</em> will be 100. Another common
situation is where <em>xmax</em> is 1.0.</p>
</dd>
<dt><strong>decimals</strong><spanclass="classifier">None or int</span></dt><dd><p>The number of decimal places to place after the point.
If <em>None</em> (the default), the number will be computed automatically.</p>
</dd>
<dt><strong>symbol</strong><spanclass="classifier">str or None</span></dt><dd><p>A string that will be appended to the label. It may be
<em>None</em> or empty to indicate that no symbol should be used. LaTeX
special characters are escaped in <em>symbol</em> whenever latex mode is
enabled, unless <em>is_latex</em> is <em>True</em>.</p>
</dd>
<dt><strong>is_latex</strong><spanclass="classifier">bool</span></dt><dd><p>If <em>False</em>, reserved LaTeX characters in <em>symbol</em> will be escaped.</p>
<codeclass="descname">convert_to_pct</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">x</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#PercentFormatter.convert_to_pct"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.PercentFormatter.convert_to_pct" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">format_pct</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">x</span></em>, <em><spanclass="n">display_range</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#PercentFormatter.format_pct"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.PercentFormatter.format_pct" title="Permalink to this definition">¶</a></dt>
<dd><p>Formats the number as a percentage number with the correct
number of decimals and adds the percent symbol, if any.</p>
<p>If <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">self.decimals</span></code> is <aclass="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.8)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">None</span></code></a>, the number of digits after the
decimal point is set based on the <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">display_range</span></code> of the axis
<emclass="property">property </em><codeclass="descname">symbol</code><aclass="headerlink" href="#matplotlib.ticker.PercentFormatter.symbol" title="Permalink to this definition">¶</a></dt>
<dd><p>The configured percent symbol as a string.</p>
<p>If LaTeX is enabled via <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=text.usetex#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["text.usetex"]</span></a></code> (default: False), the special characters
<codeclass="docutils literal notranslate"><spanclass="pre">{'#',</span><spanclass="pre">'$',</span><spanclass="pre">'%',</span><spanclass="pre">'&',</span><spanclass="pre">'~',</span><spanclass="pre">'_',</span><spanclass="pre">'^',</span><spanclass="pre">'\',</span><spanclass="pre">'{',</span><spanclass="pre">'}'}</span></code> are
automatically escaped in the string.</p>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.OldScalarFormatter">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">OldScalarFormatter</code><aclass="reference internal" href="../_modules/matplotlib/ticker.html#OldScalarFormatter"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.OldScalarFormatter" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">pprint_val</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">x</span></em>, <em><spanclass="n">d</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#OldScalarFormatter.pprint_val"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.OldScalarFormatter.pprint_val" title="Permalink to this definition">¶</a></dt>
<dd><p>[<em>Deprecated</em>] Formats the value <em>x</em> based on the size of the axis range <em>d</em>.</p>