<divid="unreleased-message"> You are reading an old version of the documentation (v3.0.0). For the latest version see <ahref="https://matplotlib.org/stable/index.html">https://matplotlib.org/stable/index.html</a></div>
<spanclass="clear_screenshots"></span><p>Matplotlib tries to make easy things easy and hard things possible. You
can generate plots, histograms, power spectra, bar charts, errorcharts,
scatterplots, etc., with just a few lines of code. For examples, see the
<aclass="reference internal" href="tutorials/introductory/sample_plots.html"><spanclass="doc">sample plots</span></a> and <aclass="reference internal" href="gallery/index.html"><spanclass="doc">thumbnail
gallery</span></a>.</p>
<p>For simple plotting the <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">pyplot</span></code> module provides a MATLAB-like interface,
particularly when combined with IPython. For the power user, you have full
control of line styles, font properties, axes properties, etc, via an object
oriented interface or via a set of functions familiar to MATLAB users.</p>
<divclass="section" id="installation">
<h1>Installation<aclass="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
<p>Visit the <aclass="reference internal" href="users/installing.html"><spanclass="doc">Matplotlib installation instructions</span></a>.</p>
</div>
<divclass="section" id="documentation">
<h1>Documentation<aclass="headerlink" href="#documentation" title="Permalink to this headline">¶</a></h1>
<p>This is the documentation for Matplotlib version 3.0.0.</p>
<p>To get started, read the <aclass="reference internal" href="users/index.html"><spanclass="doc">User's Guide</span></a>.</p>
<pid="other_versions"></p>
<script>
functiongetSnippet(id,url){
varreq=false;
// For Safari, Firefox, and other non-MS browsers
if(window.XMLHttpRequest){
try{
req=newXMLHttpRequest();
}catch(e){
req=false;
}
}elseif(window.ActiveXObject){
// For Internet Explorer on Windows
try{
req=newActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
req=newActiveXObject("Microsoft.XMLHTTP");
}catch(e){
req=false;
}
}
}
varelement=document.getElementById(id);
if(req){
// Synchronous request, wait till we have it all
req.open('GET',url,false);
req.send(null);
if(req.status==200){
element.innerHTML=req.responseText;
}else{
element.innerHTML="<mark>Could not find Snippet to insert at "+url+"</mark>"
}
}
}
getSnippet('other_versions','/versions.html');
</script><p>Trying to learn how to do a particular kind of plot? Check out the
<aclass="reference internal" href="gallery/index.html"><spanclass="doc">examples gallery</span></a> or the <aclass="reference internal" href="api/pyplot_summary.html"><spanclass="doc">list of plotting commands</span></a>.</p>
<h2>Other learning resources<aclass="headerlink" href="#other-learning-resources" title="Permalink to this headline">¶</a></h2>
<p>There are many <aclass="reference internal" href="resources/index.html"><spanclass="doc">external learning resources</span></a> available
including printed material, videos and tutorials.</p>
</div>
<divclass="section" id="need-help">
<h2>Need help?<aclass="headerlink" href="#need-help" title="Permalink to this headline">¶</a></h2>
<p>Matplotlib is a welcoming, inclusive project, and we try to follow the <aclass="reference external" href="http://www.python.org/psf/codeofconduct/">Python
Software Foundation Code of Conduct</a> in everything we do.</p>
<p>Check the <aclass="reference internal" href="faq/index.html"><spanclass="doc">FAQ</span></a> and the <aclass="reference internal" href="api/index.html"><spanclass="doc">API</span></a> docs.</p>
<p>For help, join the <aclass="reference external" href="https://gitter.im/matplotlib/matplotlib">gitter channel</a> and the <aclass="reference external" href="https://mail.python.org/mailman/listinfo/matplotlib-users">matplotlib-users</a>,
<aclass="reference external" href="https://mail.python.org/mailman/listinfo/matplotlib-devel">matplotlib-devel</a>, and <aclass="reference external" href="https://mail.python.org/mailman/listinfo/matplotlib-announce">matplotlib-announce</a> mailing lists, or check out the
Matplotlib tag on <aclass="reference external" href="http://stackoverflow.com/questions/tagged/matplotlib">stackoverflow</a>. The <aclass="reference external" href="search.html">search</a> tool searches
all of the documentation, including full text search of over 350 complete
examples which exercise almost every corner of Matplotlib.</p>
<p>You can file bugs, patches and feature requests on the <aclass="reference external" href="https://github.com/matplotlib/matplotlib/issues">issue tracker</a>, but it
is a good idea to ping us on the mailing list too.</p>
<p>To keep up to date with what's going on in Matplotlib, see the <aclass="reference internal" href="users/whats_new.html"><spanclass="doc">what's
new</span></a> page or browse the <aclass="reference external" href="https://github.com/matplotlib/matplotlib">source code</a>. Anything that could
require changes to your existing code is logged in the <aclass="reference internal" href="api/api_changes.html"><spanclass="doc">API changes</span></a> file.</p>
<divclass="section" id="toolkits">
<h3>Toolkits<aclass="headerlink" href="#toolkits" title="Permalink to this headline">¶</a></h3>
<p>Matplotlib ships with several add-on <aclass="reference internal" href="api/toolkits/index.html"><spanclass="doc">toolkits</span></a>,
including 3d plotting with <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">mplot3d</span></code>, axes helpers in <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">axes_grid1</span></code> and axis
helpers in <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">axisartist</span></code>.</p>
</div>
<divclass="section" id="third-party-packages">
<h3>Third party packages<aclass="headerlink" href="#third-party-packages" title="Permalink to this headline">¶</a></h3>
<p>A large number of <aclass="reference internal" href="thirdpartypackages/index.html"><spanclass="doc">third party packages</span></a>
extend and build on Matplotlib functionality, including several higher-level
plotting interfaces (<aclass="reference external" href="https://seaborn.github.io/">seaborn</a>, <aclass="reference external" href="http://holoviews.org">holoviews</a>, <aclass="reference external" href="http://ggplot.yhathq.com">ggplot</a>, ...), and two projection
and mapping toolkits (<aclass="reference external" href="http://matplotlib.org/basemap">basemap</a> and <aclass="reference external" href="http://scitools.org.uk/cartopy/docs/latest">cartopy</a>).</p>
</div>
<divclass="section" id="citing-matplotlib">
<h3>Citing Matplotlib<aclass="headerlink" href="#citing-matplotlib" title="Permalink to this headline">¶</a></h3>
<p>Matplotlib is the brainchild of John Hunter (1968-2012), who, along with its
many contributors, have put an immeasurable amount of time and effort into
producing a piece of software utilized by thousands of scientists worldwide.</p>
<p>If Matplotlib contributes to a project that leads to a scientific publication,
please acknowledge this work by citing the project. A <aclass="reference internal" href="citing.html"><spanclass="doc">ready-made citation
entry</span></a> is available.</p>
</div>
<divclass="section" id="open-source">
<h3>Open source<aclass="headerlink" href="#open-source" title="Permalink to this headline">¶</a></h3>
<ahref="https://www.numfocus.org/">
<imgsrc="_static/numfocus_badge.png"
alt="A Fiscally Sponsored Project of NUMFocus"
style="float:right; margin-left:20px" />
</a><p>Please consider <aclass="reference external" href="https://numfocus.salsalabs.org/donate-to-matplotlib/index.html">donating to the Matplotlib project</a> through
the Numfocus organization or to the <aclass="reference external" href="https://www.numfocus.org/programs/john-hunter-technology-fellowship/">John Hunter Technology Fellowship</a>.</p>
<p>The <aclass="reference internal" href="users/license.html"><spanclass="doc">Matplotlib license</span></a> is based on the <aclass="reference external" href="http://www.python.org/psf/license">Python Software
Foundation (PSF) license</a>.</p>
<p>There is an active developer community and a long list of people who have made
<p>Matplotlib is hosted on <aclass="reference external" href="https://github.com/matplotlib/matplotlib">Github</a>. <aclass="reference external" href="https://github.com/matplotlib/matplotlib/issues">Issues</a>
and <aclass="reference external" href="https://github.com/matplotlib/matplotlib/pulls">Pull requests</a> are tracked at Github too.</p>