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 (v2.0.0). For the latest version see <ahref="https://matplotlib.org/stable/api/cbook_api.html">https://matplotlib.org/stable/api/cbook_api.html</a></div>
<h1>cbook<aclass="headerlink" href="#cbook" title="Permalink to this headline">¶</a></h1>
<divclass="section" id="module-matplotlib.cbook">
<spanid="matplotlib-cbook"></span><h2><aclass="reference internal" href="#module-matplotlib.cbook" title="matplotlib.cbook"><codeclass="xref py py-mod docutils literal"><spanclass="pre">matplotlib.cbook</span></code></a><aclass="headerlink" href="#module-matplotlib.cbook" title="Permalink to this headline">¶</a></h2>
<p>A collection of utility functions and classes. Originally, many
(but not all) were from the Python Cookbook – hence the name cbook.</p>
<p>This module is safe to import from anywhere within matplotlib;
it imports matplotlib only at runtime.</p>
<dlclass="class">
<dtid="matplotlib.cbook.Bunch">
<emclass="property">class </em><codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">Bunch</code><spanclass="sig-paren">(</span><em>**kwds</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Bunch" title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">CallbackRegistry</code><aclass="headerlink" href="#matplotlib.cbook.CallbackRegistry" title="Permalink to this definition">¶</a></dt>
<spanclass="gp">>>> </span><spanclass="n">callbacks</span><spanclass="o">.</span><spanclass="n">process</span><spanclass="p">(</span><spanclass="s1">'be merry'</span><spanclass="p">,</span><spanclass="mi">456</span><spanclass="p">)</span><spanclass="c1"># nothing will be called</span>
<spanclass="gp">>>> </span><spanclass="n">callbacks</span><spanclass="o">.</span><spanclass="n">process</span><spanclass="p">(</span><spanclass="s1">'eat'</span><spanclass="p">,</span><spanclass="mi">456</span><spanclass="p">)</span><spanclass="c1"># nothing will be called</span>
</pre></div>
</div>
<p>In practice, one should always disconnect all callbacks when they
are no longer needed to avoid dangling references (and thus memory
leaks). However, real code in matplotlib rarely does so, and due
to its design, it is rather difficult to place this kind of code.
To get around this, and prevent this class of memory leaks, we
instead store weak references to bound methods only, so when the
destination object needs to die, the CallbackRegistry won’t keep
it alive. The Python stdlib weakref module can not create weak
references to bound methods directly, so we need to create a proxy
object to handle weak references to bound methods (or regular free
functions). This technique was shared by Peter Parente on his
<codeclass="descname">connect</code><spanclass="sig-paren">(</span><em>s</em>, <em>func</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.CallbackRegistry.connect" title="Permalink to this definition">¶</a></dt>
<dd><p>register <em>func</em> to be called when a signal <em>s</em> is generated
<codeclass="descname">disconnect</code><spanclass="sig-paren">(</span><em>cid</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.CallbackRegistry.disconnect" title="Permalink to this definition">¶</a></dt>
<dd><p>disconnect the callback registered with callback id <em>cid</em></p>
<codeclass="descname">process</code><spanclass="sig-paren">(</span><em>s</em>, <em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.CallbackRegistry.process" title="Permalink to this definition">¶</a></dt>
<dd><p>process signal <em>s</em>. All of the functions registered to receive
callbacks on <em>s</em> will be called with <em>*args</em> and <em>**kwargs</em></p>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.cbook.GetRealpathAndStat">
<emclass="property">class </em><codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">GetRealpathAndStat</code><aclass="headerlink" href="#matplotlib.cbook.GetRealpathAndStat" title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">Grouper</code><spanclass="sig-paren">(</span><em>init=()</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Grouper" title="Permalink to this definition">¶</a></dt>
<p>This class provides a lightweight way to group arbitrary objects
together into disjoint sets when a full-blown graph data structure
would be overkill.</p>
<p>Objects can be joined using <aclass="reference internal" href="#matplotlib.cbook.Grouper.join" title="matplotlib.cbook.Grouper.join"><codeclass="xref py py-meth docutils literal"><spanclass="pre">join()</span></code></a>, tested for connectedness
using <aclass="reference internal" href="#matplotlib.cbook.Grouper.joined" title="matplotlib.cbook.Grouper.joined"><codeclass="xref py py-meth docutils literal"><spanclass="pre">joined()</span></code></a>, and all disjoint sets can be retreived by
using the object as an iterator.</p>
<p>The objects being joined must be hashable and weak-referenceable.</p>
<codeclass="descname">clean</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Grouper.clean" title="Permalink to this definition">¶</a></dt>
<dd><p>Clean dead weak references from the dictionary</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.Grouper.get_siblings">
<codeclass="descname">get_siblings</code><spanclass="sig-paren">(</span><em>a</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Grouper.get_siblings" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns all of the items joined with <em>a</em>, including itself.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.Grouper.join">
<codeclass="descname">join</code><spanclass="sig-paren">(</span><em>a</em>, <em>*args</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Grouper.join" title="Permalink to this definition">¶</a></dt>
<dd><p>Join given arguments into the same set. Accepts one or more
arguments.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.Grouper.joined">
<codeclass="descname">joined</code><spanclass="sig-paren">(</span><em>a</em>, <em>b</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Grouper.joined" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns True if <em>a</em> and <em>b</em> are members of the same set.</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.Grouper.remove">
<codeclass="descname">remove</code><spanclass="sig-paren">(</span><em>a</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Grouper.remove" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="exception">
<dtid="matplotlib.cbook.IgnoredKeywordWarning">
<emclass="property">exception </em><codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">IgnoredKeywordWarning</code><aclass="headerlink" href="#matplotlib.cbook.IgnoredKeywordWarning" title="Permalink to this definition">¶</a></dt>
<p>A class for issuing warnings about keyword arguments that will be ignored
by matplotlib</p>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.cbook.Locked">
<emclass="property">class </em><codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">Locked</code><spanclass="sig-paren">(</span><em>path</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Locked" title="Permalink to this definition">¶</a></dt>
<p>(c) 2012-2013 Continuum Analytics, Inc. / <aclass="reference external" href="https://www.continuum.io/">https://www.continuum.io/</a>
All Rights Reserved</p>
<p>conda is distributed under the terms of the BSD 3-clause license.
Consult LICENSE_CONDA or <aclass="reference external" href="https://opensource.org/licenses/BSD-3-Clause">https://opensource.org/licenses/BSD-3-Clause</a>.</p>
<dlclass="attribute">
<dtid="matplotlib.cbook.Locked.LOCKFN">
<codeclass="descname">LOCKFN</code><emclass="property"> = '.matplotlib_lock'</em><aclass="headerlink" href="#matplotlib.cbook.Locked.LOCKFN" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="exception">
<dtid="matplotlib.cbook.Locked.TimeoutError">
<emclass="property">exception </em><codeclass="descname">TimeoutError</code><aclass="headerlink" href="#matplotlib.cbook.Locked.TimeoutError" title="Permalink to this definition">¶</a></dt>
<emclass="property">exception </em><codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">MatplotlibDeprecationWarning</code><aclass="headerlink" href="#matplotlib.cbook.MatplotlibDeprecationWarning" title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">MemoryMonitor</code><spanclass="sig-paren">(</span><em>nmax=20000</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.MemoryMonitor" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">clear</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.MemoryMonitor.clear" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.MemoryMonitor.plot">
<codeclass="descname">plot</code><spanclass="sig-paren">(</span><em>i0=0</em>, <em>isub=1</em>, <em>fig=None</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.MemoryMonitor.plot" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.MemoryMonitor.report">
<codeclass="descname">report</code><spanclass="sig-paren">(</span><em>segments=4</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.MemoryMonitor.report" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.MemoryMonitor.xy">
<codeclass="descname">xy</code><spanclass="sig-paren">(</span><em>i0=0</em>, <em>isub=1</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.MemoryMonitor.xy" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.cbook.Null">
<emclass="property">class </em><codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">Null</code><spanclass="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Null" title="Permalink to this definition">¶</a></dt>
<p>Null objects always and reliably “do nothing.”</p>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.cbook.RingBuffer">
<emclass="property">class </em><codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">RingBuffer</code><spanclass="sig-paren">(</span><em>size_max</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.RingBuffer" title="Permalink to this definition">¶</a></dt>
<p>class that implements a not-yet-full buffer</p>
<dlclass="method">
<dtid="matplotlib.cbook.RingBuffer.append">
<codeclass="descname">append</code><spanclass="sig-paren">(</span><em>x</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.RingBuffer.append" title="Permalink to this definition">¶</a></dt>
<dd><p>append an element at the end of the buffer</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.RingBuffer.get">
<codeclass="descname">get</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.RingBuffer.get" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list of elements from the oldest to the newest.</p>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.cbook.Sorter">
<emclass="property">class </em><codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">Sorter</code><aclass="headerlink" href="#matplotlib.cbook.Sorter" title="Permalink to this definition">¶</a></dt>
<spanclass="n">sort</span><spanclass="p">(</span><spanclass="nb">list</span><spanclass="p">,</span><spanclass="mi">1</span><spanclass="p">)</span><spanclass="c1"># sort by index 1</span>
<spanclass="n">sort</span><spanclass="p">(</span><spanclass="nb">dict</span><spanclass="p">,</span><spanclass="s1">'a'</span><spanclass="p">)</span><spanclass="c1"># sort a list of dicts by key 'a'</span>
</pre></div>
</div>
<dlclass="method">
<dtid="matplotlib.cbook.Sorter.byAttribute">
<codeclass="descname">byAttribute</code><spanclass="sig-paren">(</span><em>data</em>, <em>attributename</em>, <em>inplace=1</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Sorter.byAttribute" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.Sorter.byItem">
<codeclass="descname">byItem</code><spanclass="sig-paren">(</span><em>data</em>, <em>itemindex=None</em>, <em>inplace=1</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Sorter.byItem" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.Sorter.sort">
<codeclass="descname">sort</code><spanclass="sig-paren">(</span><em>data</em>, <em>itemindex=None</em>, <em>inplace=1</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Sorter.sort" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.cbook.Stack">
<emclass="property">class </em><codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">Stack</code><spanclass="sig-paren">(</span><em>default=None</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Stack" title="Permalink to this definition">¶</a></dt>
<p>Implement a stack where elements can be pushed on and you can move
back and forth. But no pop. Should mimic home / back / forward
in a browser</p>
<dlclass="method">
<dtid="matplotlib.cbook.Stack.back">
<codeclass="descname">back</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Stack.back" title="Permalink to this definition">¶</a></dt>
<dd><p>move the position back and return the current element</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.Stack.bubble">
<codeclass="descname">bubble</code><spanclass="sig-paren">(</span><em>o</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Stack.bubble" title="Permalink to this definition">¶</a></dt>
<dd><p>raise <em>o</em> to the top of the stack and return <em>o</em>. <em>o</em> must be
in the stack</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.Stack.clear">
<codeclass="descname">clear</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Stack.clear" title="Permalink to this definition">¶</a></dt>
<dd><p>empty the stack</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.Stack.empty">
<codeclass="descname">empty</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Stack.empty" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.Stack.forward">
<codeclass="descname">forward</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Stack.forward" title="Permalink to this definition">¶</a></dt>
<dd><p>move the position forward and return the current element</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.Stack.home">
<codeclass="descname">home</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Stack.home" title="Permalink to this definition">¶</a></dt>
<dd><p>push the first element onto the top of the stack</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.Stack.push">
<codeclass="descname">push</code><spanclass="sig-paren">(</span><em>o</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Stack.push" title="Permalink to this definition">¶</a></dt>
<dd><p>push object onto stack at current position - all elements
occurring later than the current position are discarded</p>
</dd></dl>
<dlclass="method">
<dtid="matplotlib.cbook.Stack.remove">
<codeclass="descname">remove</code><spanclass="sig-paren">(</span><em>o</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Stack.remove" title="Permalink to this definition">¶</a></dt>
<dd><p>remove element <em>o</em> from the stack</p>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.cbook.Xlator">
<emclass="property">class </em><codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">Xlator</code><aclass="headerlink" href="#matplotlib.cbook.Xlator" title="Permalink to this definition">¶</a></dt>
<divclass="highlight-default"><divclass="highlight"><pre><span></span><spanclass="n">text</span><spanclass="o">=</span><spanclass="s2">"Larry Wall is the creator of Perl"</span>
<spanclass="s2">"Larry Wall"</span><spanclass="p">:</span><spanclass="s2">"Guido van Rossum"</span><spanclass="p">,</span>
<spanclass="s2">"creator"</span><spanclass="p">:</span><spanclass="s2">"Benevolent Dictator for Life"</span><spanclass="p">,</span>
<codeclass="descname">xlat</code><spanclass="sig-paren">(</span><em>text</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.Xlator.xlat" title="Permalink to this definition">¶</a></dt>
<dd><p>Translate <em>text</em>, returns the modified text.</p>
</dd></dl>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.align_iterators">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">align_iterators</code><spanclass="sig-paren">(</span><em>func</em>, <em>*iterables</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.align_iterators" title="Permalink to this definition">¶</a></dt>
<dd><p>This generator takes a bunch of iterables that are ordered by func
<p>It is used by <aclass="reference internal" href="mlab_api.html#matplotlib.mlab.recs_join" title="matplotlib.mlab.recs_join"><codeclass="xref py py-func docutils literal"><spanclass="pre">matplotlib.mlab.recs_join()</span></code></a> to join record arrays</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.allequal">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">allequal</code><spanclass="sig-paren">(</span><em>seq</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.allequal" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <em>True</em> if all elements of <em>seq</em> compare equal. If <em>seq</em> is
0 or 1 length, return <em>True</em></p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.allpairs">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">allpairs</code><spanclass="sig-paren">(</span><em>x</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.allpairs" title="Permalink to this definition">¶</a></dt>
<dd><p>return all possible pairs in sequence <em>x</em></p>
<p>Condensed by Alex Martelli from this <aclass="reference external" href="http://groups.google.com/groups?q=all+pairs+group:*python*&hl=en&lr=&ie=UTF-8&selm=mailman.4028.1096403649.5135.python-list%40python.org&rnum=1">thread</a> on c.l.python</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.alltrue">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">alltrue</code><spanclass="sig-paren">(</span><em>seq</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.alltrue" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <em>True</em> if all elements of <em>seq</em> evaluate to <em>True</em>. If
<em>seq</em> is empty, return <em>False</em>.</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.boxplot_stats">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">boxplot_stats</code><spanclass="sig-paren">(</span><em>X</em>, <em>whis=1.5</em>, <em>bootstrap=None</em>, <em>labels=None</em>, <em>autorange=False</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.boxplot_stats" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns list of dictionaries of statistics used to draw a series
of box and whisker plots. The <codeclass="xref py py-obj docutils literal"><spanclass="pre">Returns</span></code> section enumerates the
required keys of the dictionary. Users can skip this function and
pass a user-defined set of dictionaries to the new <codeclass="xref py py-obj docutils literal"><spanclass="pre">axes.bxp</span></code> method
instead of relying on MPL to do the calculations.</p>
<div><p>Data that will be represented in the boxplots. Should have 2 or
fewer dimensions.</p>
</div></blockquote>
<p><strong>whis</strong> : float, string, or sequence (default = 1.5)</p>
<blockquote>
<div><p>As a float, determines the reach of the whiskers past the first
and third quartiles (e.g., Q3 + whis*IQR, QR = interquartile
range, Q3-Q1). Beyond the whiskers, data are considered outliers
and are plotted as individual points. This can be set this to an
ascending sequence of percentile (e.g., [5, 95]) to set the
whiskers at specific percentiles of the data. Finally, <codeclass="xref py py-obj docutils literal"><spanclass="pre">whis</span></code>
can be the string <codeclass="docutils literal"><spanclass="pre">'range'</span></code> to force the whiskers to the
minimum and maximum of the data. In the edge case that the 25th
and 75th percentiles are equivalent, <codeclass="xref py py-obj docutils literal"><spanclass="pre">whis</span></code> can be automatically
set to <codeclass="docutils literal"><spanclass="pre">'range'</span></code> via the <codeclass="xref py py-obj docutils literal"><spanclass="pre">autorange</span></code> option.</p>
</div></blockquote>
<p><strong>bootstrap</strong> : int, optional</p>
<blockquote>
<div><p>Number of times the confidence intervals around the median
<div><p>When <codeclass="xref py py-obj docutils literal"><spanclass="pre">True</span></code> and the data are distributed such that the 25th and
75th percentiles are equal, <codeclass="docutils literal"><spanclass="pre">whis</span></code> is set to <codeclass="docutils literal"><spanclass="pre">'range'</span></code> such
that the whisker ends are at the minimum and maximum of the
data.</p>
</div></blockquote>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first"><strong>bxpstats</strong> : list of dict</p>
<blockquoteclass="last">
<div><p>A list of dictionaries containing the results for each column
of data. Keys of each dictionary are the following:</p>
<tableborder="1" class="docutils">
<colgroup>
<colwidth="19%" />
<colwidth="81%" />
</colgroup>
<theadvalign="bottom">
<trclass="row-odd"><thclass="head">Key</th>
<thclass="head">Value Description</th>
</tr>
</thead>
<tbodyvalign="top">
<trclass="row-even"><td>label</td>
<td>tick label for the boxplot</td>
</tr>
<trclass="row-odd"><td>mean</td>
<td>arithemetic mean value</td>
</tr>
<trclass="row-even"><td>med</td>
<td>50th percentile</td>
</tr>
<trclass="row-odd"><td>q1</td>
<td>first quartile (25th percentile)</td>
</tr>
<trclass="row-even"><td>q3</td>
<td>third quartile (75th percentile)</td>
</tr>
<trclass="row-odd"><td>cilo</td>
<td>lower notch around the median</td>
</tr>
<trclass="row-even"><td>cihi</td>
<td>upper notch around the median</td>
</tr>
<trclass="row-odd"><td>whislo</td>
<td>end of the lower whisker</td>
</tr>
<trclass="row-even"><td>whishi</td>
<td>end of the upper whisker</td>
</tr>
<trclass="row-odd"><td>fliers</td>
<td>outliers</td>
</tr>
</tbody>
</table>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<pclass="rubric">Notes</p>
<p>Non-bootstrapping approach to confidence interval uses Gaussian-
McGill, R., Tukey, J.W., and Larsen, W.A. (1978) “Variations of
Boxplots”, The American Statistician, 32:12-16.</p>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.cbook.converter">
<emclass="property">class </em><codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">converter</code><spanclass="sig-paren">(</span><em>missing='Null'</em>, <em>missingval=None</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.converter" title="Permalink to this definition">¶</a></dt>
<p>Base class for handling string -> python type with support for
missing values</p>
<dlclass="method">
<dtid="matplotlib.cbook.converter.is_missing">
<codeclass="descname">is_missing</code><spanclass="sig-paren">(</span><em>s</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.converter.is_missing" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.dedent">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">dedent</code><spanclass="sig-paren">(</span><em>s</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.dedent" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove excess indentation from docstring <em>s</em>.</p>
<p>Discards any leading blank lines, then removes up to n whitespace
characters from each line, where n is the number of leading
whitespace characters in the first line. It differs from
textwrap.dedent in its deletion of leading blank lines and its use
of the first non-blank line to determine the indentation.</p>
<p>It is also faster in most cases.</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.delete_masked_points">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">delete_masked_points</code><spanclass="sig-paren">(</span><em>*args</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.delete_masked_points" title="Permalink to this definition">¶</a></dt>
<dd><p>Find all masked and/or non-finite points in a set of arguments,
and return the arguments with only the unmasked points remaining.</p>
<p>Arguments can be in any of 5 categories:</p>
<olclass="arabic simple">
<li>1-D masked arrays</li>
<li>1-D ndarrays</li>
<li>ndarrays with more than one dimension</li>
<li>other non-string iterables</li>
<li>anything else</li>
</ol>
<p>The first argument must be in one of the first four categories;
any argument with a length differing from that of the first
argument (and hence anything in category 5) then will be
passed through unchanged.</p>
<p>Masks are obtained from all arguments of the correct length
in categories 1, 2, and 4; a point is bad if masked in a masked
array or if it is a nan or inf. No attempt is made to
extract a mask from categories 2, 3, and 4 if <codeclass="xref py py-meth docutils literal"><spanclass="pre">np.isfinite()</span></code>
does not yield a Boolean array.</p>
<p>All input arguments that are not passed unchanged are returned
as ndarrays after removing the points or rows corresponding to
masks in any of the arguments.</p>
<p>A vastly simpler version of this function was originally
written as a helper for Axes.scatter().</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.deprecated">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">deprecated</code><spanclass="sig-paren">(</span><em>since</em>, <em>message=''</em>, <em>name=''</em>, <em>alternative=''</em>, <em>pending=False</em>, <em>obj_type='function'</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.deprecated" title="Permalink to this definition">¶</a></dt>
<dd><p>Decorator to mark a function as deprecated.</p>
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">dict_delall</code><spanclass="sig-paren">(</span><em>d</em>, <em>keys</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.dict_delall" title="Permalink to this definition">¶</a></dt>
<dd><p>delete all of the <em>keys</em> from the <codeclass="xref py py-class docutils literal"><spanclass="pre">dict</span></code><em>d</em></p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.exception_to_str">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">exception_to_str</code><spanclass="sig-paren">(</span><em>s=None</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.exception_to_str" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.file_requires_unicode">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">file_requires_unicode</code><spanclass="sig-paren">(</span><em>x</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.file_requires_unicode" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <codeclass="xref py py-obj docutils literal"><spanclass="pre">True</span></code> if the given writable file-like object requires Unicode
to be written to it.</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.finddir">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">finddir</code><spanclass="sig-paren">(</span><em>o</em>, <em>match</em>, <em>case=False</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.finddir" title="Permalink to this definition">¶</a></dt>
<dd><p>return all attributes of <em>o</em> which match string in match. if case
is True require an exact case match.</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.flatten">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">flatten</code><spanclass="sig-paren">(</span><em>seq</em>, <em>scalarp=<function is_scalar_or_string></em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.flatten" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a generator of flattened nested containers</p>
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">get_label</code><spanclass="sig-paren">(</span><em>y</em>, <em>default_name</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.get_label" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.get_recursive_filelist">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">get_recursive_filelist</code><spanclass="sig-paren">(</span><em>args</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.get_recursive_filelist" title="Permalink to this definition">¶</a></dt>
<dd><p>Recurse all the files and dirs in <em>args</em> ignoring symbolic links
and return the files as a list of strings</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.get_sample_data">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">get_sample_data</code><spanclass="sig-paren">(</span><em>fname</em>, <em>asfileobj=True</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.get_sample_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a sample data file. <em>fname</em> is a path relative to the
<codeclass="xref py py-obj docutils literal"><spanclass="pre">mpl-data/sample_data</span></code> directory. If <em>asfileobj</em> is <codeclass="xref py py-obj docutils literal"><spanclass="pre">True</span></code>
return a file object, otherwise just a file path.</p>
<p>Set the rc parameter examples.directory to the directory where we should
look, if sample_data files are stored in a location different than
default (which is ‘mpl-data/sample_data` at the same level of ‘matplotlib`
Python module files).</p>
<p>If the filename ends in .gz, the file is implicitly ungzipped.</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.get_split_ind">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">get_split_ind</code><spanclass="sig-paren">(</span><em>seq</em>, <em>N</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.get_split_ind" title="Permalink to this definition">¶</a></dt>
<dd><p><em>seq</em> is a list of words. Return the index into seq such that:</p>
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">index_of</code><spanclass="sig-paren">(</span><em>y</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.index_of" title="Permalink to this definition">¶</a></dt>
<dd><p>A helper function to get the index of an input to plot
against if x values are not explicitly given.</p>
<p>Tries to get <codeclass="xref py py-obj docutils literal"><spanclass="pre">y.index</span></code> (works if this is a pd.Series), if that
fails, return np.arange(y.shape[0]).</p>
<p>This will be extended in the future to deal with more types of
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">is_hashable</code><spanclass="sig-paren">(</span><em>obj</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.is_hashable" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns true if <em>obj</em> can be hashed</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.is_math_text">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">is_math_text</code><spanclass="sig-paren">(</span><em>s</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.is_math_text" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.is_numlike">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">is_numlike</code><spanclass="sig-paren">(</span><em>obj</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.is_numlike" title="Permalink to this definition">¶</a></dt>
<dd><p>return true if <em>obj</em> looks like a number</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.is_scalar">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">is_scalar</code><spanclass="sig-paren">(</span><em>obj</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.is_scalar" title="Permalink to this definition">¶</a></dt>
<dd><p>return true if <em>obj</em> is not string like and is not iterable</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.is_scalar_or_string">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">is_scalar_or_string</code><spanclass="sig-paren">(</span><em>val</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.is_scalar_or_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Return whether the given object is a scalar or string like.</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.is_sequence_of_strings">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">is_sequence_of_strings</code><spanclass="sig-paren">(</span><em>obj</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.is_sequence_of_strings" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns true if <em>obj</em> is iterable and contains strings</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.is_string_like">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">is_string_like</code><spanclass="sig-paren">(</span><em>obj</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.is_string_like" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if <em>obj</em> looks like a string</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.is_writable_file_like">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">is_writable_file_like</code><spanclass="sig-paren">(</span><em>obj</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.is_writable_file_like" title="Permalink to this definition">¶</a></dt>
<dd><p>return true if <em>obj</em> looks like a file object with a <em>write</em> method</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.issubclass_safe">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">issubclass_safe</code><spanclass="sig-paren">(</span><em>x</em>, <em>klass</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.issubclass_safe" title="Permalink to this definition">¶</a></dt>
<dd><p>return issubclass(x, klass) and return False on a TypeError</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.iterable">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">iterable</code><spanclass="sig-paren">(</span><em>obj</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.iterable" title="Permalink to this definition">¶</a></dt>
<dd><p>return true if <em>obj</em> is iterable</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.listFiles">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">listFiles</code><spanclass="sig-paren">(</span><em>root</em>, <em>patterns='*'</em>, <em>recurse=1</em>, <em>return_folders=0</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.listFiles" title="Permalink to this definition">¶</a></dt>
<dd><p>Recursively list files</p>
<p>from Parmar and Martelli in the Python Cookbook</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.cbook.local_over_kwdict">
<codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">local_over_kwdict</code><spanclass="sig-paren">(</span><em>local_var</em>, <em>kwargs</em>, <em>*keys</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.local_over_kwdict" title="Permalink to this definition">¶</a></dt>
<dd><p>Enforces the priority of a local variable over potentially conflicting
argument(s) from a kwargs dict. The following possible output values are
<div><p>For each key in keys that is removed from kwargs but not used as
the output value</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.cbook.maxdict">
<emclass="property">class </em><codeclass="descclassname">matplotlib.cbook.</code><codeclass="descname">maxdict</code><spanclass="sig-paren">(</span><em>maxsize</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.cbook.maxdict" title="Permalink to this definition">¶</a></dt>