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.3.3). For the latest version see <ahref="https://matplotlib.org/stable/api/ticker_api.html">https://matplotlib.org/stable/api/ticker_api.html</a></div>
<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>
<h2>Tick locating and formatting<aclass="headerlink" href="#tick-locating-and-formatting" title="Permalink to this headline">¶</a></h2>
<p>This module contains classes for configuring tick locating and formatting.
Generic tick locators and formatters are provided, as well as domain specific
custom ones.</p>
<p>Although the locators know nothing about major or minor ticks, they are used
by the Axis class to support major and minor tick locating and formatting.</p>
<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
<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>In addition to a <aclass="reference internal" href="#matplotlib.ticker.Formatter" title="matplotlib.ticker.Formatter"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Formatter</span></code></a> instance, <aclass="reference internal" href="_as_gen/matplotlib.axis.Axis.set_major_formatter.html#matplotlib.axis.Axis.set_major_formatter" title="matplotlib.axis.Axis.set_major_formatter"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">set_major_formatter</span></code></a> and
<aclass="reference internal" href="_as_gen/matplotlib.axis.Axis.set_minor_formatter.html#matplotlib.axis.Axis.set_minor_formatter" title="matplotlib.axis.Axis.set_minor_formatter"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">set_minor_formatter</span></code></a> also accept a <codeclass="docutils literal notranslate"><spanclass="pre">str</span></code> or function. <codeclass="docutils literal notranslate"><spanclass="pre">str</span></code> input
will be internally replaced with an autogenerated <aclass="reference internal" href="#matplotlib.ticker.StrMethodFormatter" title="matplotlib.ticker.StrMethodFormatter"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">StrMethodFormatter</span></code></a> with
the input <codeclass="docutils literal notranslate"><spanclass="pre">str</span></code>. For function input, a <aclass="reference internal" href="#matplotlib.ticker.FuncFormatter" title="matplotlib.ticker.FuncFormatter"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">FuncFormatter</span></code></a> with the input
function will be generated and used.</p>
<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.AutoLocator">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">AutoLocator</code><aclass="reference internal" href="../_modules/matplotlib/ticker.html#AutoLocator"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.AutoLocator" title="Permalink to this definition">¶</a></dt>
<p>Dynamically find major tick positions. This is actually a subclass
of <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 parameters <em>nbins = 'auto'</em>
and <em>steps = [1, 2, 2.5, 5, 10]</em>.</p>
<p>To know the values of the non-public parameters, please have a
look to the defaults of <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>.</p>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.AutoMinorLocator">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">AutoMinorLocator</code><spanclass="sig-paren">(</span><em><spanclass="n">n</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#AutoMinorLocator"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.AutoMinorLocator" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">tick_values</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#AutoMinorLocator.tick_values"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.AutoMinorLocator.tick_values" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the values of the located ticks given <strong>vmin</strong> and <strong>vmax</strong>.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p>To get tick locations with the vmin and vmax values defined
automatically for the associated <codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">axis</span></code> simply call
<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: <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: <codeclass="docutils literal notranslate"><spanclass="pre">False</span></code>)</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: <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=axes.formatter.use_mathtext#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["axes.formatter.use_mathtext"]</span></a></code> (default: <codeclass="docutils literal notranslate"><spanclass="pre">False</span></code>)</span></dt><dd><p>To enable/disable the use mathtext for rendering the numbers in
<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>Format 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.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>
<p>Return fixed strings for tick labels based only on position, not value.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last"><aclass="reference internal" href="#matplotlib.ticker.FixedFormatter" title="matplotlib.ticker.FixedFormatter"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">FixedFormatter</span></code></a> should only be used together with <aclass="reference internal" href="#matplotlib.ticker.FixedLocator" title="matplotlib.ticker.FixedLocator"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">FixedLocator</span></code></a>.
Otherwise, the labels may end up in unexpected positions.</p>
</div>
<p>Set the sequence <em>seq</em> of strings that will be used for labels.</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#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.FixedLocator">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">FixedLocator</code><spanclass="sig-paren">(</span><em><spanclass="n">locs</span></em>, <em><spanclass="n">nbins</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#FixedLocator"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.FixedLocator" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_params</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">nbins</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#FixedLocator.set_params"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.FixedLocator.set_params" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">tick_values</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#FixedLocator.tick_values"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.FixedLocator.tick_values" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the locations of the ticks.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">Because the values are fixed, vmin and vmax are not used in this
method.</p>
</div>
</dd></dl>
</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.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">
<emclass="property">static </em><codeclass="descname">fix_minus</code><spanclass="sig-paren">(</span><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. This is a
helper method to perform such a replacement when it is enabled via
<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>Return 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><p>Set the locations of the ticks.</p>
<p>This method is called before computing the tick labels because some
formatters need to know all tick locations to do so.</p>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.FuncFormatter">
<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>
<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#FuncFormatter.get_offset"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.FuncFormatter.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#FuncFormatter.set_offset_string"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.FuncFormatter.set_offset_string" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</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="o">**</span><spanclass="n">kwargs</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>[<em>Deprecated</em>] 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>labels</strong><spanclass="classifier">list</span></dt><dd><p>List of labels.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<pclass="rubric">Notes</p>
<divclass="deprecated">
<p><spanclass="versionmodified deprecated">Deprecated since version 3.3.</span></p>
</div>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.IndexLocator">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">IndexLocator</code><spanclass="sig-paren">(</span><em><spanclass="n">base</span></em>, <em><spanclass="n">offset</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#IndexLocator"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.IndexLocator" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_params</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">base</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">offset</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#IndexLocator.set_params"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.IndexLocator.set_params" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">tick_values</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#IndexLocator.tick_values"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.IndexLocator.tick_values" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the values of the located ticks given <strong>vmin</strong> and <strong>vmax</strong>.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p>To get tick locations with the vmin and vmax values defined
automatically for the associated <codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">axis</span></code> simply call
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">LinearLocator</code><spanclass="sig-paren">(</span><em><spanclass="n">numticks</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">presets</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LinearLocator"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LinearLocator" title="Permalink to this definition">¶</a></dt>
<p>The first time this function is called it will try to set the
number of ticks to make a nice tick partitioning. Thereafter the
number of ticks will be fixed so that interactive navigation will
be nice</p>
<p>Use presets to set locs based on lom. A dict mapping vmin, vmax->locs</p>
<dlclass="py method">
<dtid="matplotlib.ticker.LinearLocator.numticks">
<emclass="property">property </em><codeclass="descname">numticks</code><aclass="headerlink" href="#matplotlib.ticker.LinearLocator.numticks" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_params</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">numticks</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">presets</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LinearLocator.set_params"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LinearLocator.set_params" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">tick_values</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#LinearLocator.tick_values"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LinearLocator.tick_values" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the values of the located ticks given <strong>vmin</strong> and <strong>vmax</strong>.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p>To get tick locations with the vmin and vmax values defined
automatically for the associated <codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">axis</span></code> simply call
<codeclass="descname">view_limits</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#LinearLocator.view_limits"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LinearLocator.view_limits" title="Permalink to this definition">¶</a></dt>
<dd><p>Try to choose the view limits intelligently.</p>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.Locator">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">Locator</code><aclass="reference internal" href="../_modules/matplotlib/ticker.html#Locator"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Locator" title="Permalink to this definition">¶</a></dt>
<p>Note that the same locator should not be used across multiple
<aclass="reference internal" href="axis_api.html#matplotlib.axis.Axis" title="matplotlib.axis.Axis"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axis</span></code></a> because the locator stores references to the Axis
data and view limits.</p>
<dlclass="py attribute">
<dtid="matplotlib.ticker.Locator.MAXTICKS">
<codeclass="descname">MAXTICKS</code><emclass="property"> = 1000</em><aclass="headerlink" href="#matplotlib.ticker.Locator.MAXTICKS" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.Locator.autoscale">
<codeclass="descname">autoscale</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#Locator.autoscale"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Locator.autoscale" title="Permalink to this definition">¶</a></dt>
<dd><p>[<em>Deprecated</em>] Autoscale the view limits.</p>
<pclass="rubric">Notes</p>
<divclass="deprecated">
<p><spanclass="versionmodified deprecated">Deprecated since version 3.2.</span></p>
</div>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.Locator.nonsingular">
<codeclass="descname">nonsingular</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">v0</span></em>, <em><spanclass="n">v1</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#Locator.nonsingular"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Locator.nonsingular" title="Permalink to this definition">¶</a></dt>
<dd><p>Adjust a range as needed to avoid singularities.</p>
<p>This method gets called during autoscaling, with <codeclass="docutils literal notranslate"><spanclass="pre">(v0,</span><spanclass="pre">v1)</span></code> set to
the data limits on the axes if the axes contains any data, or
<codeclass="docutils literal notranslate"><spanclass="pre">(-inf,</span><spanclass="pre">+inf)</span></code> if not.</p>
<ulclass="simple">
<li>If <codeclass="docutils literal notranslate"><spanclass="pre">v0</span><spanclass="pre">==</span><spanclass="pre">v1</span></code> (possibly up to some floating point slop), this
method returns an expanded interval around this value.</li>
<li>If <codeclass="docutils literal notranslate"><spanclass="pre">(v0,</span><spanclass="pre">v1)</span><spanclass="pre">==</span><spanclass="pre">(-inf,</span><spanclass="pre">+inf)</span></code>, this method returns appropriate
default view limits.</li>
<li>Otherwise, <codeclass="docutils literal notranslate"><spanclass="pre">(v0,</span><spanclass="pre">v1)</span></code> is returned without modification.</li>
</ul>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.Locator.pan">
<codeclass="descname">pan</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">numsteps</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#Locator.pan"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Locator.pan" title="Permalink to this definition">¶</a></dt>
<dd><p>[<em>Deprecated</em>] Pan numticks (can be positive or negative)</p>
<pclass="rubric">Notes</p>
<divclass="deprecated">
<p><spanclass="versionmodified deprecated">Deprecated since version 3.3.</span></p>
<codeclass="descname">raise_if_exceeds</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#Locator.raise_if_exceeds"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Locator.raise_if_exceeds" title="Permalink to this definition">¶</a></dt>
<dd><p>Log at WARNING level if <em>locs</em> is longer than <aclass="reference internal" href="#matplotlib.ticker.Locator.MAXTICKS" title="matplotlib.ticker.Locator.MAXTICKS"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Locator.MAXTICKS</span></code></a>.</p>
<p>This is intended to be called immediately before returning <em>locs</em> from
<codeclass="docutils literal notranslate"><spanclass="pre">__call__</span></code> to inform users in case their Locator returns a huge
number of ticks, causing Matplotlib to run out of memory.</p>
<p>The "strange" name of this method dates back to when it would raise an
exception instead of emitting a log.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.Locator.refresh">
<codeclass="descname">refresh</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#Locator.refresh"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Locator.refresh" title="Permalink to this definition">¶</a></dt>
<dd><p>[<em>Deprecated</em>] Refresh internal information based on current limits.</p>
<pclass="rubric">Notes</p>
<divclass="deprecated">
<p><spanclass="versionmodified deprecated">Deprecated since version 3.3.</span></p>
</div>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.Locator.set_params">
<codeclass="descname">set_params</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#Locator.set_params"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Locator.set_params" title="Permalink to this definition">¶</a></dt>
<dd><p>Do nothing, and raise a warning. Any locator class not supporting the
set_params() function will call this.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.Locator.tick_values">
<codeclass="descname">tick_values</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#Locator.tick_values"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Locator.tick_values" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the values of the located ticks given <strong>vmin</strong> and <strong>vmax</strong>.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p>To get tick locations with the vmin and vmax values defined
automatically for the associated <codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">axis</span></code> simply call
<codeclass="descname">view_limits</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#Locator.view_limits"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Locator.view_limits" title="Permalink to this definition">¶</a></dt>
<dd><p>Select a scale for the range from vmin to vmax.</p>
<p>Subclasses should override this method to change locator behaviour.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.Locator.zoom">
<codeclass="descname">zoom</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">direction</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#Locator.zoom"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.Locator.zoom" title="Permalink to this definition">¶</a></dt>
<dd><p>[<em>Deprecated</em>] Zoom in/out on axis; if direction is >0 zoom in, else zoom out.</p>
<pclass="rubric">Notes</p>
<divclass="deprecated">
<p><spanclass="versionmodified deprecated">Deprecated since version 3.3.</span></p>
</div>
</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, default: 10.</span></dt><dd><p>Base of the logarithm used in all calculations.</p>
</dd>
<dt><strong>labelOnlyBase</strong><spanclass="classifier">bool, 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), 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, 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>Return 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 string version of the tick value.</p>
<p>Defaults to the position-independent long value.</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>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>labelOnlyBase</strong><spanclass="classifier">bool</span></dt><dd><p>If True, label ticks only at integer powers of base.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</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>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>subs</strong><spanclass="classifier">None or str or sequence of float, default: (1.0,)</span></dt><dd><p>Gives the multiples of integer powers of the base at which
to place ticks. The default places ticks only at
integer powers of the base.
The permitted string values are <codeclass="docutils literal notranslate"><spanclass="pre">'auto'</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">'all'</span></code>,
both of which use an algorithm based on the axis view
limits to determine whether and how to put ticks between
integer powers of the base. With <codeclass="docutils literal notranslate"><spanclass="pre">'auto'</span></code>, ticks are
placed only between integer powers; with <codeclass="docutils literal notranslate"><spanclass="pre">'all'</span></code>, the
integer powers are included. A value of None is
equivalent to <codeclass="docutils literal notranslate"><spanclass="pre">'auto'</span></code>.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
<dlclass="py method">
<dtid="matplotlib.ticker.LogLocator.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#LogLocator.base"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogLocator.base" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the log base (major tick every <codeclass="docutils literal notranslate"><spanclass="pre">base**i</span></code>, i integer).</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.LogLocator.nonsingular">
<codeclass="descname">nonsingular</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#LogLocator.nonsingular"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogLocator.nonsingular" title="Permalink to this definition">¶</a></dt>
<dd><p>Adjust a range as needed to avoid singularities.</p>
<p>This method gets called during autoscaling, with <codeclass="docutils literal notranslate"><spanclass="pre">(v0,</span><spanclass="pre">v1)</span></code> set to
the data limits on the axes if the axes contains any data, or
<codeclass="docutils literal notranslate"><spanclass="pre">(-inf,</span><spanclass="pre">+inf)</span></code> if not.</p>
<ulclass="simple">
<li>If <codeclass="docutils literal notranslate"><spanclass="pre">v0</span><spanclass="pre">==</span><spanclass="pre">v1</span></code> (possibly up to some floating point slop), this
method returns an expanded interval around this value.</li>
<li>If <codeclass="docutils literal notranslate"><spanclass="pre">(v0,</span><spanclass="pre">v1)</span><spanclass="pre">==</span><spanclass="pre">(-inf,</span><spanclass="pre">+inf)</span></code>, this method returns appropriate
default view limits.</li>
<li>Otherwise, <codeclass="docutils literal notranslate"><spanclass="pre">(v0,</span><spanclass="pre">v1)</span></code> is returned without modification.</li>
</ul>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.LogLocator.set_params">
<codeclass="descname">set_params</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">base</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">subs</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">numdecs</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <em><spanclass="n">numticks</span><spanclass="o">=</span><spanclass="default_value">None</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogLocator.set_params"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogLocator.set_params" title="Permalink to this definition">¶</a></dt>
<dd><p>Set parameters within this locator.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.LogLocator.subs">
<codeclass="descname">subs</code><spanclass="sig-paren">(</span><em><spanclass="n">self</span></em>, <em><spanclass="n">subs</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogLocator.subs"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogLocator.subs" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the minor ticks for the log scaling every <codeclass="docutils literal notranslate"><spanclass="pre">base**i*subs[j]</span></code>.</p>
</dd></dl>
<dlclass="py method">
<dtid="matplotlib.ticker.LogLocator.tick_values">
<codeclass="descname">tick_values</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#LogLocator.tick_values"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogLocator.tick_values" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the values of the located ticks given <strong>vmin</strong> and <strong>vmax</strong>.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p>To get tick locations with the vmin and vmax values defined
automatically for the associated <codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">axis</span></code> simply call
<codeclass="descname">view_limits</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#LogLocator.view_limits"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogLocator.view_limits" title="Permalink to this definition">¶</a></dt>
<dd><p>Try to choose the view limits intelligently.</p>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="matplotlib.ticker.LogitFormatter">
<emclass="property">class </em><codeclass="descclassname">matplotlib.ticker.</code><codeclass="descname">LogitFormatter</code><spanclass="sig-paren">(</span><em><spanclass="o">*</span></em>, <em><spanclass="n">use_overline</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <em><spanclass="n">one_half</span><spanclass="o">=</span><spanclass="default_value">'\x0crac{1}{2}'</span></em>, <em><spanclass="n">minor</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <em><spanclass="n">minor_threshold</span><spanclass="o">=</span><spanclass="default_value">25</span></em>, <em><spanclass="n">minor_number</span><spanclass="o">=</span><spanclass="default_value">6</span></em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/ticker.html#LogitFormatter"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.ticker.LogitFormatter" 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>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 string version of the tick value.</p>
<p>Defaults to the position-independent long value.</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>
<dd><p>Set the locations of the ticks.</p>
<p>This method is called before computing the tick labels because some
formatters need to know all tick locations to do so.</p>
<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