<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Screenshots — Matplotlib v1.1.1 documentation</title> <link rel="stylesheet" href="../_static/mpl.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '1.1.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <link rel="search" type="application/opensearchdescription+xml" title="Search within Matplotlib v1.1.1 documentation" href="../_static/opensearch.xml"/> <link rel="top" title="Matplotlib v1.1.1 documentation" href="../index.html" /> <link rel="up" title="User’s Guide" href="index.html" /> <link rel="next" title="What’s new in matplotlib" href="whats_new.html" /> <link rel="prev" title="Our Favorite Recipes" href="recipes.html" /> </head> <body> <!-- Piwik --> <script type="text/javascript"> if ("matplotlib.sourceforge.net" == document.location.hostname || "matplotlib.sf.net" == document.location.hostname) { var pkBaseURL = (("https:" == document.location.protocol) ? "https://apps.sourceforge.net/piwik/matplotlib/" : "http://apps.sourceforge.net/piwik/matplotlib/"); document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); } </script> <script type="text/javascript"> if ("matplotlib.sourceforge.net" == document.location.hostname || "matplotlib.sf.net" == document.location.hostname) { piwik_action_name = ''; piwik_idsite = 1; piwik_url = pkBaseURL + "piwik.php"; piwik_log(piwik_action_name, piwik_idsite, piwik_url); document.write(unescape('%3Cobject%3E%3Cnoscript%3E%3Cp%3E%3Cimg src="http://apps.sourceforge.net/piwik/matplotlib/piwik.php?idsite=1" alt="piwik"/%3E%3C/p%3E%3C/noscript%3E%3C/object%3E')); } </script> <!-- End Piwik Tag --> <link rel="shortcut icon" href="_static/favicon.ico"> <div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px"> <a href="../index.html"><img src="../_static/logo2.png" border="0" alt="matplotlib"/></a> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="whats_new.html" title="What’s new in matplotlib" accesskey="N">next</a> |</li> <li class="right" > <a href="recipes.html" title="Our Favorite Recipes" accesskey="P">previous</a> |</li> <li><a href="../index.html">home</a>| </li> <li><a href="../search.html">search</a>| </li> <li><a href="../examples/index.html">examples</a>| </li> <li><a href="../gallery.html">gallery</a>| </li> <li><a href="../contents.html">docs</a> »</li> <li><a href="index.html" accesskey="U">User’s Guide</a> »</li> </ul> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="../contents.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Screenshots</a><ul> <li><a class="reference internal" href="#simple-plot">Simple Plot</a></li> <li><a class="reference internal" href="#subplot-demo">Subplot demo</a></li> <li><a class="reference internal" href="#histograms">Histograms</a></li> <li><a class="reference internal" href="#path-demo">Path demo</a></li> <li><a class="reference internal" href="#mplot3d">mplot3d</a></li> <li><a class="reference internal" href="#ellipses">Ellipses</a></li> <li><a class="reference internal" href="#bar-charts">Bar charts</a></li> <li><a class="reference internal" href="#pie-charts">Pie charts</a></li> <li><a class="reference internal" href="#table-demo">Table demo</a></li> <li><a class="reference internal" href="#scatter-demo">Scatter demo</a></li> <li><a class="reference internal" href="#slider-demo">Slider demo</a></li> <li><a class="reference internal" href="#fill-demo">Fill demo</a></li> <li><a class="reference internal" href="#date-demo">Date demo</a></li> <li><a class="reference internal" href="#financial-charts">Financial charts</a></li> <li><a class="reference internal" href="#basemap-demo">Basemap demo</a></li> <li><a class="reference internal" href="#log-plots">Log plots</a></li> <li><a class="reference internal" href="#polar-plots">Polar plots</a></li> <li><a class="reference internal" href="#legends">Legends</a></li> <li><a class="reference internal" href="#mathtext-examples">Mathtext_examples</a></li> <li><a class="reference internal" href="#native-tex-rendering">Native TeX rendering</a></li> <li><a class="reference internal" href="#eeg-demo">EEG demo</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="recipes.html" title="previous chapter">Our Favorite Recipes</a></p> <h4>Next topic</h4> <p class="topless"><a href="whats_new.html" title="next chapter">What’s new in matplotlib</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/users/screenshots.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> <input type="text" name="q" size="18" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="screenshots"> <span id="matplotlibscreenshots"></span><h1>Screenshots<a class="headerlink" href="#screenshots" title="Permalink to this headline">¶</a></h1> <p>Here you will find a host of example figures with the code that generated them</p> <div class="section" id="simple-plot"> <h2>Simple Plot<a class="headerlink" href="#simple-plot" title="Permalink to this headline">¶</a></h2> <p>The most basic <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.plot" title="matplotlib.pyplot.plot"><tt class="xref py py-func docutils literal"><span class="pre">plot()</span></tt></a>, with text labels</p> <p>(<a class="reference external" href="../mpl_examples/pylab_examples/simple_plot.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/simple_plot.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/simple_plot.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/simple_plot.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/simple_plot.png" src="../_images/simple_plot.png" /> </div> </div> <div class="section" id="subplot-demo"> <span id="screenshots-subplot-demo"></span><h2>Subplot demo<a class="headerlink" href="#subplot-demo" title="Permalink to this headline">¶</a></h2> <p>Multiple regular axes (numrows by numcolumns) are created with the <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.subplot" title="matplotlib.pyplot.subplot"><tt class="xref py py-func docutils literal"><span class="pre">subplot()</span></tt></a> command.</p> <p>(<a class="reference external" href="../mpl_examples/pylab_examples/subplot_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/subplot_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/subplot_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/subplot_demo.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/subplot_demo.png" src="../_images/subplot_demo.png" /> </div> </div> <div class="section" id="histograms"> <span id="screenshots-histogram-demo"></span><h2>Histograms<a class="headerlink" href="#histograms" title="Permalink to this headline">¶</a></h2> <p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.hist" title="matplotlib.pyplot.hist"><tt class="xref py py-func docutils literal"><span class="pre">hist()</span></tt></a> command automatically generates histograms and will return the bin counts or probabilities</p> <p>(<a class="reference external" href="../mpl_examples/pylab_examples/histogram_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/histogram_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/histogram_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/histogram_demo.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/histogram_demo.png" src="../_images/histogram_demo.png" /> </div> </div> <div class="section" id="path-demo"> <span id="screenshots-path-demo"></span><h2>Path demo<a class="headerlink" href="#path-demo" title="Permalink to this headline">¶</a></h2> <p>You can add aribitrary paths in matplotlib as of release 0.98. See the <a class="reference internal" href="../api/path_api.html#module-matplotlib.path" title="matplotlib.path"><tt class="xref py py-mod docutils literal"><span class="pre">matplotlib.path</span></tt></a>.</p> <p>(<a class="reference external" href="../mpl_examples/api/path_patch_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/api/path_patch_demo.png">png</a>, <a class="reference external" href="../mpl_examples/api/path_patch_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/api/path_patch_demo.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/path_patch_demo.png" src="../_images/path_patch_demo.png" /> </div> </div> <div class="section" id="mplot3d"> <span id="screenshots-mplot3d-surface"></span><h2>mplot3d<a class="headerlink" href="#mplot3d" title="Permalink to this headline">¶</a></h2> <p>The mplot3d toolkit (see <a class="reference internal" href="../mpl_toolkits/mplot3d/tutorial.html#toolkit-mplot3d-tutorial"><em>mplot3d tutorial</em></a> and <a class="reference internal" href="../examples/mplot3d/index.html#mplot3d-examples-index"><em>mplot3d Examples</em></a>) has support for simple 3d graphs including surface, wireframe, scatter, and bar charts (added in matlpotlib-0.99). Thanks to John Porter, Jonathon Taylor and Reinier Heeres for the mplot3d toolkit. The toolkit is included with all standard matplotlib installs.</p> <p>(<a class="reference external" href="../mpl_examples/mplot3d/surface3d_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/mplot3d/surface3d_demo.png">png</a>, <a class="reference external" href="../mpl_examples/mplot3d/surface3d_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/mplot3d/surface3d_demo.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/surface3d_demo.png" src="../_images/surface3d_demo.png" /> </div> </div> <div class="section" id="ellipses"> <span id="screenshots-ellipse-demo"></span><h2>Ellipses<a class="headerlink" href="#ellipses" title="Permalink to this headline">¶</a></h2> <p>In support of the <a class="reference external" href="http://www.jpl.nasa.gov/news/phoenix/main.php">Phoenix</a> mission to Mars, which used matplotlib in ground tracking of the spacecraft, Michael Droettboom built on work by Charlie Moad to provide an extremely accurate 8-spline approximation to elliptical arcs (see <a class="reference internal" href="../api/artist_api.html#matplotlib.patches.Arc" title="matplotlib.patches.Arc"><tt class="xref py py-class docutils literal"><span class="pre">Arc</span></tt></a>) in the viewport. This provides a scale free, accurate graph of the arc regardless of zoom level</p> <p>(<a class="reference external" href="../mpl_examples/pylab_examples/ellipse_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/ellipse_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/ellipse_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/ellipse_demo.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/ellipse_demo.png" src="../_images/ellipse_demo.png" /> </div> </div> <div class="section" id="bar-charts"> <span id="screenshots-barchart-demo"></span><h2>Bar charts<a class="headerlink" href="#bar-charts" title="Permalink to this headline">¶</a></h2> <p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.bar" title="matplotlib.pyplot.bar"><tt class="xref py py-func docutils literal"><span class="pre">bar()</span></tt></a> command takes error bars as an optional argument. You can also use up and down bars, stacked bars, candlestick bars, etc, ... See <a class="reference external" href="examples/pylab_examples/bar_stacked.py">bar_stacked.py</a> for another example. You can make horizontal bar charts with the <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.barh" title="matplotlib.pyplot.barh"><tt class="xref py py-func docutils literal"><span class="pre">barh()</span></tt></a> command.</p> <p>(<a class="reference external" href="../mpl_examples/pylab_examples/barchart_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/barchart_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/barchart_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/barchart_demo.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/barchart_demo1.png" src="../_images/barchart_demo1.png" /> </div> </div> <div class="section" id="pie-charts"> <span id="screenshots-pie-demo"></span><h2>Pie charts<a class="headerlink" href="#pie-charts" title="Permalink to this headline">¶</a></h2> <p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.pie" title="matplotlib.pyplot.pie"><tt class="xref py py-func docutils literal"><span class="pre">pie()</span></tt></a> command uses a MATLAB compatible syntax to produce pie charts. Optional features include auto-labeling the percentage of area, exploding one or more wedges out from the center of the pie, and a shadow effect. Take a close look at the attached code that produced this figure; nine lines of code.</p> <p>(<a class="reference external" href="../mpl_examples/pylab_examples/pie_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/pie_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/pie_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/pie_demo.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/pie_demo.png" src="../_images/pie_demo.png" /> </div> </div> <div class="section" id="table-demo"> <span id="screenshots-table-demo"></span><h2>Table demo<a class="headerlink" href="#table-demo" title="Permalink to this headline">¶</a></h2> <p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.table" title="matplotlib.pyplot.table"><tt class="xref py py-func docutils literal"><span class="pre">table()</span></tt></a> command will place a text table on the axes</p> <p>(<a class="reference external" href="../mpl_examples/pylab_examples/table_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/table_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/table_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/table_demo.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/table_demo.png" src="../_images/table_demo.png" /> </div> </div> <div class="section" id="scatter-demo"> <span id="screenshots-scatter-demo"></span><h2>Scatter demo<a class="headerlink" href="#scatter-demo" title="Permalink to this headline">¶</a></h2> <p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.scatter" title="matplotlib.pyplot.scatter"><tt class="xref py py-func docutils literal"><span class="pre">scatter()</span></tt></a> command makes a scatter plot with (optional) size and color arguments. This example plots changes in Google stock price from one day to the next with the sizes coding trading volume and the colors coding price change in day i. Here the alpha attribute is used to make semitransparent circle markers with the Agg backend (see <a class="reference internal" href="../faq/usage_faq.html#what-is-a-backend"><em>What is a backend?</em></a>)</p> <p>(<a class="reference external" href="../mpl_examples/pylab_examples/scatter_demo2.py">Source code</a>)</p> </div> <div class="section" id="slider-demo"> <span id="screenshots-slider-demo"></span><h2>Slider demo<a class="headerlink" href="#slider-demo" title="Permalink to this headline">¶</a></h2> <p>Matplotlib has basic GUI widgets that are independent of the graphical user interface you are using, allowing you to write cross GUI figures and widgets. See matplotlib.widgets and the widget <cite>examples <examples/widgets></cite></p> <p>(<a class="reference external" href="../mpl_examples/widgets/slider_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/widgets/slider_demo.png">png</a>, <a class="reference external" href="../mpl_examples/widgets/slider_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/widgets/slider_demo.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/slider_demo.png" src="../_images/slider_demo.png" /> </div> </div> <div class="section" id="fill-demo"> <span id="screenshots-fill-demo"></span><h2>Fill demo<a class="headerlink" href="#fill-demo" title="Permalink to this headline">¶</a></h2> <p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.fill" title="matplotlib.pyplot.fill"><tt class="xref py py-func docutils literal"><span class="pre">fill()</span></tt></a> command lets you plot filled polygons. Thanks to Andrew Straw for providing this function</p> <p>(<a class="reference external" href="../mpl_examples/pylab_examples/fill_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/fill_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/fill_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/fill_demo.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/fill_demo.png" src="../_images/fill_demo.png" /> </div> </div> <div class="section" id="date-demo"> <span id="screenshots-date-demo"></span><h2>Date demo<a class="headerlink" href="#date-demo" title="Permalink to this headline">¶</a></h2> <p>You can plot date data with major and minor ticks and custom tick formatters for both the major and minor ticks; see matplotlib.ticker and matplotlib.dates for details and usage.</p> <p>(<a class="reference external" href="../mpl_examples/api/date_demo.py">Source code</a>)</p> </div> <div class="section" id="financial-charts"> <span id="screenshots-jdh-demo"></span><h2>Financial charts<a class="headerlink" href="#financial-charts" title="Permalink to this headline">¶</a></h2> <p>You can make much more sophisticated financial plots. This example emulates one of the <a class="reference external" href="http://www.advsofteng.com/gallery_finance.html">ChartDirector</a> financial plots. Some of the data in the plot, are real financial data, some are random traces that I used since the goal was to illustrate plotting techniques, not market analysis!</p> <p>(<a class="reference external" href="../mpl_examples/pylab_examples/finance_work2.py">Source code</a>)</p> </div> <div class="section" id="basemap-demo"> <span id="screenshots-basemap-demo"></span><h2>Basemap demo<a class="headerlink" href="#basemap-demo" title="Permalink to this headline">¶</a></h2> <p>Jeff Whitaker’s <a class="reference internal" href="../mpl_toolkits/index.html#toolkit-basemap"><em>Basemap</em></a> add-on toolkit makes it possible to plot data on many different map projections. This example shows how to plot contours, markers and text on an orthographic projection, with NASA’s “blue marble” satellite image as a background.</p> <p>(<a class="reference external" href="../pyplots/plotmap.py">Source code</a>, <a class="reference external" href="../pyplots/plotmap.png">png</a>, <a class="reference external" href="../pyplots/plotmap.hires.png">hires.png</a>, <a class="reference external" href="../pyplots/plotmap.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/plotmap.png" src="../_images/plotmap.png" /> </div> </div> <div class="section" id="log-plots"> <span id="screenshots-log-demo"></span><h2>Log plots<a class="headerlink" href="#log-plots" title="Permalink to this headline">¶</a></h2> <p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.semilogx" title="matplotlib.pyplot.semilogx"><tt class="xref py py-func docutils literal"><span class="pre">semilogx()</span></tt></a>, <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.semilogy" title="matplotlib.pyplot.semilogy"><tt class="xref py py-func docutils literal"><span class="pre">semilogy()</span></tt></a> and <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.loglog" title="matplotlib.pyplot.loglog"><tt class="xref py py-func docutils literal"><span class="pre">loglog()</span></tt></a> functions generate log scaling on the respective axes. The lower subplot uses a base10 log on the xaxis and a base 4 log on the yaxis. Thanks to Andrew Straw, Darren Dale and Gregory Lielens for contributions to the log scaling infrastructure.</p> <p>(<a class="reference external" href="../mpl_examples/pylab_examples/log_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/log_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/log_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/log_demo.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/log_demo.png" src="../_images/log_demo.png" /> </div> </div> <div class="section" id="polar-plots"> <span id="screenshots-polar-demo"></span><h2>Polar plots<a class="headerlink" href="#polar-plots" title="Permalink to this headline">¶</a></h2> <p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.polar" title="matplotlib.pyplot.polar"><tt class="xref py py-func docutils literal"><span class="pre">polar()</span></tt></a> command generates polar plots.</p> <p>(<a class="reference external" href="../mpl_examples/pylab_examples/polar_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/polar_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/polar_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/polar_demo.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/polar_demo.png" src="../_images/polar_demo.png" /> </div> </div> <div class="section" id="legends"> <span id="screenshots-legend-demo"></span><h2>Legends<a class="headerlink" href="#legends" title="Permalink to this headline">¶</a></h2> <p>The <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.legend" title="matplotlib.pyplot.legend"><tt class="xref py py-func docutils literal"><span class="pre">legend()</span></tt></a> command automatically generates figure legends, with MATLAB compatible legend placement commands. Thanks to Charles Twardy for input on the legend command</p> <p>(<a class="reference external" href="../mpl_examples/pylab_examples/legend_demo.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/legend_demo.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/legend_demo.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/legend_demo.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/legend_demo1.png" src="../_images/legend_demo1.png" /> </div> </div> <div class="section" id="mathtext-examples"> <span id="screenshots-mathtext-examples-demo"></span><h2>Mathtext_examples<a class="headerlink" href="#mathtext-examples" title="Permalink to this headline">¶</a></h2> <p>A sampling of the many TeX expressions now supported by matplotlib’s internal mathtext engine. The mathtext module provides TeX style mathematical expressions using <a class="reference external" href="http://freetype.sourceforge.net/index2.html">freetype2</a> and the BaKoMa computer modern or <a class="reference external" href="http://www.stixfonts.org">STIX</a> fonts. See the <a class="reference internal" href="../api/mathtext_api.html#module-matplotlib.mathtext" title="matplotlib.mathtext"><tt class="xref py py-mod docutils literal"><span class="pre">matplotlib.mathtext</span></tt></a> module for additional. matplotlib mathtext is an independent implementation, and does not required TeX or any external packages installed on your computer. See the tutorial at <a class="reference internal" href="mathtext.html#mathtext-tutorial"><em>Writing mathematical expressions</em></a>.</p> <p>(<a class="reference external" href="../mpl_examples/pylab_examples/mathtext_examples.py">Source code</a>, <a class="reference external" href="../mpl_examples/pylab_examples/mathtext_examples.png">png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/mathtext_examples.hires.png">hires.png</a>, <a class="reference external" href="../mpl_examples/pylab_examples/mathtext_examples.pdf">pdf</a>)</p> <div class="figure"> <img alt="../_images/mathtext_examples.png" src="../_images/mathtext_examples.png" /> </div> </div> <div class="section" id="native-tex-rendering"> <span id="screenshots-tex-demo"></span><h2>Native TeX rendering<a class="headerlink" href="#native-tex-rendering" title="Permalink to this headline">¶</a></h2> <p>Although matplotlib’s internal math rendering engine is quite powerful, sometimes you need TeX, and matplotlib supports external TeX rendering of strings with the <em>usetex</em> option.</p> <p>(<a class="reference external" href="../pyplots/tex_demo.py">Source code</a>)</p> </div> <div class="section" id="eeg-demo"> <span id="screenshots-eeg-demo"></span><h2>EEG demo<a class="headerlink" href="#eeg-demo" title="Permalink to this headline">¶</a></h2> <p>You can embed matplotlib into pygtk, wxpython, Tk, FLTK or Qt applications. Here is a screenshot of an eeg viewer called pbrain which is part of the NeuroImaging in Python suite <a class="reference external" href="http://neuroimaging.scipy.org">NIPY</a>. Pbrain is written in pygtk using matplotlib. The lower axes uses <a class="reference internal" href="../api/pyplot_api.html#matplotlib.pyplot.specgram" title="matplotlib.pyplot.specgram"><tt class="xref py py-func docutils literal"><span class="pre">specgram()</span></tt></a> to plot the spectrogram of one of the EEG channels. For an example of how to use the navigation toolbar in your applications, see <a class="reference internal" href="../examples/user_interfaces/embedding_in_gtk2.html#user-interfaces-embedding-in-gtk2"><em>user_interfaces example code: embedding_in_gtk2.py</em></a>. If you want to use matplotlib in a wx application, see <a class="reference internal" href="../examples/user_interfaces/embedding_in_wx2.html#user-interfaces-embedding-in-wx2"><em>user_interfaces example code: embedding_in_wx2.py</em></a>. If you want to work with <a class="reference external" href="http://glade.gnome.org">glade</a>, see <a class="reference internal" href="../examples/user_interfaces/mpl_with_glade.html#user-interfaces-mpl-with-glade"><em>user_interfaces example code: mpl_with_glade.py</em></a>.</p> <img alt="../_images/eeg_small.png" src="../_images/eeg_small.png" /> </div> </div> </div> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="whats_new.html" title="What’s new in matplotlib" >next</a> |</li> <li class="right" > <a href="recipes.html" title="Our Favorite Recipes" >previous</a> |</li> <li><a href="../index.html">home</a>| </li> <li><a href="../search.html">search</a>| </li> <li><a href="../examples/index.html">examples</a>| </li> <li><a href="../gallery.html">gallery</a>| </li> <li><a href="../contents.html">docs</a> »</li> <li><a href="index.html" >User’s Guide</a> »</li> </ul> </div> <div class="footer"> © Copyright 2008, John Hunter, Darren Dale, Michael Droettboom. Last updated on Oct 04, 2012. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. </div> </body> </html>