<h1>The top level <ttclass="xref py py-mod docutils literal"><spanclass="pre">matplotlib</span></tt> module<aclass="headerlink" href="#the-top-level-matplotlib-module" title="Permalink to this headline">¶</a></h1>
<dlclass="function">
<dtid="matplotlib.use">
<ttclass="descclassname">matplotlib.</tt><ttclass="descname">use</tt><big>(</big><em>arg</em>, <em>warn=True</em>, <em>force=False</em><big>)</big><aclass="headerlink" href="#matplotlib.use" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the matplotlib backend to one of the known backends.</p>
<p>The argument is case-insensitive. <em>warn</em> specifies whether a
warning should be issued if a backend has already been set up.
<em>force</em> is an <strong>experimental</strong> flag that tells matplotlib to
attempt to initialize a new backend by reloading the backend
module.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">This function must be called <em>before</em> importing pyplot for
the first time; or, if you are not using pyplot, it must be called
before importing matplotlib.backends. If warn is True, a warning
is issued if you try and call this after pylab or pyplot have been
loaded. In certain black magic use cases, e.g.
<aclass="reference internal" href="pyplot_api.html#matplotlib.pyplot.switch_backend" title="matplotlib.pyplot.switch_backend"><ttclass="xref py py-func docutils literal"><spanclass="pre">pyplot.switch_backend()</span></tt></a>, we are doing the reloading necessary to
make the backend switch work (in some cases, e.g., pure image
backends) so one can set warn=False to suppress the warnings.</p>
</div>
<p>To find out which backend is currently set, see
<ttclass="descclassname">matplotlib.</tt><ttclass="descname">get_backend</tt><big>(</big><big>)</big><aclass="headerlink" href="#matplotlib.get_backend" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the name of the current backend.</p>
</dd></dl>
<dlclass="data">
<dtid="matplotlib.rcParams">
<ttclass="descclassname">matplotlib.</tt><ttclass="descname">rcParams</tt><aclass="headerlink" href="#matplotlib.rcParams" title="Permalink to this definition">¶</a></dt>
<dd><p>An instance of <aclass="reference internal" href="#matplotlib.RcParams" title="matplotlib.RcParams"><ttclass="xref py py-class docutils literal"><spanclass="pre">RcParams</span></tt></a> for handling default matplotlib values.</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.rc">
<ttclass="descclassname">matplotlib.</tt><ttclass="descname">rc</tt><big>(</big><em>group</em>, <em>**kwargs</em><big>)</big><aclass="headerlink" href="#matplotlib.rc" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the current rc params. Group is the grouping for the rc, e.g.,
for <ttclass="docutils literal"><spanclass="pre">lines.linewidth</span></tt> the group is <ttclass="docutils literal"><spanclass="pre">lines</span></tt>, for
<ttclass="docutils literal"><spanclass="pre">axes.facecolor</span></tt>, the group is <ttclass="docutils literal"><spanclass="pre">axes</span></tt>, and so on. Group may
also be a list or tuple of group names, e.g., (<em>xtick</em>, <em>ytick</em>).
<em>kwargs</em> is a dictionary attribute name/value pairs, e.g.,:</p>
<spanclass="n">rc</span><spanclass="p">(</span><spanclass="s">'font'</span><spanclass="p">,</span><spanclass="o">**</span><spanclass="n">font</span><spanclass="p">)</span><spanclass="c"># pass in the font dict as kwargs</span>
</pre></div>
</div>
<p>This enables you to easily switch between several configurations.
Use <aclass="reference internal" href="pyplot_api.html#matplotlib.pyplot.rcdefaults" title="matplotlib.pyplot.rcdefaults"><ttclass="xref py py-func docutils literal"><spanclass="pre">rcdefaults()</span></tt></a> to restore the default
rc params after changes.</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.matplotlib_fname">
<ttclass="descclassname">matplotlib.</tt><ttclass="descname">matplotlib_fname</tt><big>(</big><big>)</big><aclass="headerlink" href="#matplotlib.matplotlib_fname" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the location of the config file.</p>
<p>The file location is determined in the following order</p>
<li><ttclass="xref py py-obj docutils literal"><spanclass="pre">$HOME/.matplotlib/matplotlibrc</span></tt> if <ttclass="xref py py-obj docutils literal"><spanclass="pre">$HOME</span></tt> is defined.</li>
</ul>
</div></blockquote>
</li>
<li><pclass="first">Lastly, it looks in <ttclass="xref py py-obj docutils literal"><spanclass="pre">$MATPLOTLIBDATA/matplotlibrc</span></tt> for a
system-defined copy.</p>
</li>
</ul>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.RcParams">
<emclass="property">class </em><ttclass="descclassname">matplotlib.</tt><ttclass="descname">RcParams</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><aclass="headerlink" href="#matplotlib.RcParams" title="Permalink to this definition">¶</a></dt>
<dd><p>A dictionary object including validation</p>
<p>validating functions are defined and associated with rc parameters in
<ttclass="descclassname">matplotlib.</tt><ttclass="descname">rc_params</tt><big>(</big><em>fail_on_error=False</em><big>)</big><aclass="headerlink" href="#matplotlib.rc_params" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a <aclass="reference internal" href="#matplotlib.RcParams" title="matplotlib.RcParams"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.RcParams</span></tt></a> instance from the
default matplotlib rc file.</p>
</dd></dl>
<dlclass="function">
<dtid="matplotlib.rc_params_from_file">
<ttclass="descclassname">matplotlib.</tt><ttclass="descname">rc_params_from_file</tt><big>(</big><em>fname</em>, <em>fail_on_error=False</em>, <em>use_default_template=True</em><big>)</big><aclass="headerlink" href="#matplotlib.rc_params_from_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <aclass="reference internal" href="#matplotlib.RcParams" title="matplotlib.RcParams"><ttclass="xref py py-class docutils literal"><spanclass="pre">matplotlib.RcParams</span></tt></a> from the contents of the given file.</p>
<div><p>If True, initialize with default parameters before updating with those
in the given file. If False, the configuration class only contains the
parameters specified in the file. (Useful for updating dicts.)</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.rc_context">
<emclass="property">class </em><ttclass="descclassname">matplotlib.</tt><ttclass="descname">rc_context</tt><big>(</big><em>rc=None</em>, <em>fname=None</em><big>)</big><aclass="headerlink" href="#matplotlib.rc_context" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a context manager for managing rc settings.</p>