<liclass="toctree-l2"><aclass="reference internal" href="text/pgf.html">Text rendering with XeLaTeX/LuaLaTeX via the <codeclass="docutils literal notranslate"><spanclass="pre">pgf</span></code> backend</a></li>
<liclass="toctree-l2"><aclass="reference internal" href="text/usetex.html">Text rendering with LaTeX</a></li>
<spanid="id1"></span><h1>Tutorials<aclass="headerlink" href="#tutorials" title="Permalink to this heading">#</a></h1>
<p>This page contains more in-depth guides for using Matplotlib.
It is broken up into beginner, intermediate, and advanced sections,
as well as sections covering specific topics.</p>
<p>For shorter examples, see our <aclass="reference internal" href="../gallery/index.html#examples-index"><spanclass="std std-ref">examples page</span></a>.
You can also find <aclass="reference internal" href="../users/resources/index.html#resources-index"><spanclass="std std-ref">external resources</span></a> and
a <aclass="reference internal" href="../users/faq/index.html#faq-index"><spanclass="std std-ref">FAQ</span></a> in our <aclass="reference internal" href="../users/index.html#users-guide-index"><spanclass="std std-ref">user guide</span></a>.</p>
<h2>Introductory<aclass="headerlink" href="#introductory" title="Permalink to this heading">#</a></h2>
<p>These tutorials cover the basics of creating visualizations with
Matplotlib, as well as some best-practices in using the package
effectively.</p>
<divclass="sphx-glr-thumbnails"><divclass="sphx-glr-thumbcontainer" tooltip="This tutorial covers some basic usage patterns and best practices to help you get started with ..."><imgalt="" src="../_images/sphx_glr_quick_start_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="An introduction to the pyplot interface. Please also see /tutorials/introductory/quick_start f..."><imgalt="" src="../_images/sphx_glr_pyplot_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="A short tutorial on plotting images with Matplotlib."><imgalt="" src="../_images/sphx_glr_images_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="This tutorial aims to show the beginning, middle, and end of a single visualization using Matpl..."><imgalt="" src="../_images/sphx_glr_lifecycle_thumb.png" />
<p><aclass="reference internal" href="introductory/lifecycle.html#sphx-glr-tutorials-introductory-lifecycle-py"><spanclass="std std-ref">The Lifecycle of a Plot</span></a></p>
<divclass="sphx-glr-thumbnail-title">The Lifecycle of a Plot</div>
</div><divclass="sphx-glr-thumbcontainer" tooltip="Tips for customizing the properties and default styles of Matplotlib."><imgalt="" src="../_images/sphx_glr_customizing_thumb.png" />
<p><aclass="reference internal" href="introductory/customizing.html#sphx-glr-tutorials-introductory-customizing-py"><spanclass="std std-ref">Customizing Matplotlib with style sheets and rcParams</span></a></p>
<divclass="sphx-glr-thumbnail-title">Customizing Matplotlib with style sheets and rcParams</div>
</div><divclass="sphx-glr-thumbcontainer" tooltip="Based on its plotting functionality, Matplotlib also provides an interface to generate animatio..."><imgalt="" src="../_images/sphx_glr_animation_tutorial_thumb.gif" />
<p><aclass="reference internal" href="introductory/animation_tutorial.html#sphx-glr-tutorials-introductory-animation-tutorial-py"><spanclass="std std-ref">Animations using Matplotlib</span></a></p>
<divclass="sphx-glr-thumbnail-title">Animations using Matplotlib</div>
</div></div></section>
<sectionid="intermediate">
<h2>Intermediate<aclass="headerlink" href="#intermediate" title="Permalink to this heading">#</a></h2>
<p>These tutorials cover some of the more complicated classes and functions
in Matplotlib. They can be useful for particular custom and complex
visualizations.</p>
<divclass="sphx-glr-thumbnails"><divclass="sphx-glr-thumbcontainer" tooltip="Using Artist objects to render on the canvas."><imgalt="" src="../_images/sphx_glr_artists_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="Demo of custom property-cycle settings to control colors and other style properties for multi-l..."><imgalt="" src="../_images/sphx_glr_color_cycle_thumb.png" />
<p><aclass="reference internal" href="intermediate/color_cycle.html#sphx-glr-tutorials-intermediate-color-cycle-py"><spanclass="std std-ref">Styling with cycler</span></a></p>
<divclass="sphx-glr-thumbnail-title">Styling with cycler</div>
</div><divclass="sphx-glr-thumbcontainer" tooltip="How to use constrained-layout to fit plots within your figure cleanly."><imgalt="" src="../_images/sphx_glr_constrainedlayout_guide_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="How to use tight-layout to fit plots within your figure cleanly."><imgalt="" src="../_images/sphx_glr_tight_layout_guide_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="Often more than one Axes is wanted on a figure at a time, usually organized into a regular grid..."><imgalt="" src="../_images/sphx_glr_arranging_axes_thumb.png" />
<p><aclass="reference internal" href="intermediate/arranging_axes.html#sphx-glr-tutorials-intermediate-arranging-axes-py"><spanclass="std std-ref">Arranging multiple Axes in a Figure</span></a></p>
<divclass="sphx-glr-thumbnail-title">Arranging multiple Axes in a Figure</div>
</div><divclass="sphx-glr-thumbcontainer" tooltip="The limits on an axis can be set manually (e.g. ax.set_xlim(xmin, xmax)) or Matplotlib can set ..."><imgalt="" src="../_images/sphx_glr_autoscale_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="imshow allows you to render an image (either a 2D array which will be color-mapped (based on no..."><imgalt="" src="../_images/sphx_glr_imshow_extent_thumb.png" />
<p><aclass="reference internal" href="intermediate/imshow_extent.html#sphx-glr-tutorials-intermediate-imshow-extent-py"><spanclass="std std-ref">origin and extent in imshow</span></a></p>
<divclass="sphx-glr-thumbnail-title">origin and extent in ~.Axes.imshow</div>
</div></div></section>
<sectionid="advanced">
<h2>Advanced<aclass="headerlink" href="#advanced" title="Permalink to this heading">#</a></h2>
<p>These tutorials cover advanced topics for experienced Matplotlib
users and developers.</p>
<divclass="sphx-glr-thumbnails"><divclass="sphx-glr-thumbcontainer" tooltip="Blitting is a standard technique in raster graphics that, in the context of Matplotlib, can be ..."><imgalt="" src="../_images/sphx_glr_blitting_thumb.png" />
<p><aclass="reference internal" href="advanced/blitting.html#sphx-glr-tutorials-advanced-blitting-py"><spanclass="std std-ref">Faster rendering by using blitting</span></a></p>
<divclass="sphx-glr-thumbnail-title">Faster rendering by using blitting</div>
</div><divclass="sphx-glr-thumbcontainer" tooltip="Defining paths in your Matplotlib visualization."><imgalt="" src="../_images/sphx_glr_path_tutorial_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="Defining paths that objects follow on a canvas."><imgalt="" src="../_images/sphx_glr_patheffects_guide_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="Like any graphics packages, Matplotlib is built on top of a transformation framework to easily ..."><imgalt="" src="../_images/sphx_glr_transforms_tutorial_thumb.png" />
<h2>Colors<aclass="headerlink" href="#colors" title="Permalink to this heading">#</a></h2>
<p>Matplotlib has support for visualizing information with a wide array
of colors and colormaps. These tutorials cover the basics of how
these colormaps look, how you can create your own, and how you can
customize colormaps for your use case.</p>
<p>For even more information see the <aclass="reference internal" href="../gallery/color/index.html#color-examples"><spanclass="std std-ref">examples page</span></a>.</p>
</div><divclass="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to build and customize standalone colorbars, i.e. without an attached p..."><imgalt="" src="../_images/sphx_glr_colorbar_only_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="Matplotlib has a number of built-in colormaps accessible via .matplotlib.colormaps. There are ..."><imgalt="" src="../_images/sphx_glr_colormap-manipulation_thumb.png" />
<p><aclass="reference internal" href="colors/colormap-manipulation.html#sphx-glr-tutorials-colors-colormap-manipulation-py"><spanclass="std std-ref">Creating Colormaps in Matplotlib</span></a></p>
<divclass="sphx-glr-thumbnail-title">Creating Colormaps in Matplotlib</div>
</div><divclass="sphx-glr-thumbcontainer" tooltip="Objects that use colormaps by default linearly map the colors in the colormap from data values ..."><imgalt="" src="../_images/sphx_glr_colormapnorms_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="Matplotlib has a number of built-in colormaps accessible via .matplotlib.colormaps. There are ..."><imgalt="" src="../_images/sphx_glr_colormaps_thumb.png" />
<p><aclass="reference internal" href="colors/colormaps.html#sphx-glr-tutorials-colors-colormaps-py"><spanclass="std std-ref">Choosing Colormaps in Matplotlib</span></a></p>
<divclass="sphx-glr-thumbnail-title">Choosing Colormaps in Matplotlib</div>
</div></div></section>
<sectionid="text">
<h2>Text<aclass="headerlink" href="#text" title="Permalink to this heading">#</a></h2>
<p>matplotlib has extensive text support, including support for
mathematical expressions, truetype support for raster and
vector outputs, newline separated text with arbitrary
rotations, and Unicode support. These tutorials cover
the basics of working with text in Matplotlib.</p>
<divclass="sphx-glr-thumbnails"><divclass="sphx-glr-thumbcontainer" tooltip="Introduction to plotting and working with text in Matplotlib."><imgalt="" src="../_images/sphx_glr_text_intro_thumb.png" />
<p><aclass="reference internal" href="text/text_intro.html#sphx-glr-tutorials-text-text-intro-py"><spanclass="std std-ref">Text in Matplotlib Plots</span></a></p>
<divclass="sphx-glr-thumbnail-title">Text in Matplotlib Plots</div>
</div><divclass="sphx-glr-thumbcontainer" tooltip="Controlling properties of text and its layout with Matplotlib."><imgalt="" src="../_images/sphx_glr_text_props_thumb.png" />
<p><aclass="reference internal" href="text/text_props.html#sphx-glr-tutorials-text-text-props-py"><spanclass="std std-ref">Text properties and layout</span></a></p>
<divclass="sphx-glr-thumbnail-title">Text properties and layout</div>
</div><divclass="sphx-glr-thumbcontainer" tooltip="Annotations are graphical elements, often pieces of text, that explain, add context to, or othe..."><imgalt="" src="../_images/sphx_glr_annotations_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="You can use a subset of TeX markup in any Matplotlib text string by placing it inside a pair of..."><imgalt="" src="../_images/sphx_glr_mathtext_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="Using the pgf backend, Matplotlib can export figures as pgf drawing commands that can be proces..."><imgalt="" src="../_images/sphx_glr_pgf_thumb.png" />
<p><aclass="reference internal" href="text/pgf.html#sphx-glr-tutorials-text-pgf-py"><spanclass="std std-ref">Text rendering with XeLaTeX/LuaLaTeX via the pgf backend</span></a></p>
<divclass="sphx-glr-thumbnail-title">Text rendering with XeLaTeX/LuaLaTeX via the pgf backend</div>
</div><divclass="sphx-glr-thumbcontainer" tooltip="Matplotlib can use LaTeX to render text. This is activated by setting text.usetex : True in yo..."><imgalt="" src="../_images/sphx_glr_usetex_thumb.png" />
<p><aclass="reference internal" href="text/usetex.html#sphx-glr-tutorials-text-usetex-py"><spanclass="std std-ref">Text rendering with LaTeX</span></a></p>
<divclass="sphx-glr-thumbnail-title">Text rendering with LaTeX</div>
</div></div></section>
<sectionid="toolkits">
<h2>Toolkits<aclass="headerlink" href="#toolkits" title="Permalink to this heading">#</a></h2>
<p>These tutorials cover toolkits designed to extend the functionality
of Matplotlib in order to accomplish specific goals.</p>
<divclass="sphx-glr-thumbnails"><divclass="sphx-glr-thumbcontainer" tooltip=".axes_grid1 provides the following features:"><imgalt="" src="../_images/sphx_glr_axes_grid_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="The axisartist contains a custom Axes class that is meant to support curvilinear grids (e.g., t..."><imgalt="" src="../_images/sphx_glr_axisartist_thumb.png" />
</div><divclass="sphx-glr-thumbcontainer" tooltip="Generating 3D plots using the mplot3d toolkit."><imgalt="" src="../_images/sphx_glr_mplot3d_thumb.png" />
<h2>Provisional<aclass="headerlink" href="#provisional" title="Permalink to this heading">#</a></h2>
<p>These tutorials cover proposed APIs of any complexity. These are here
to document features that we have released, but want to get user
feedback on before committing to them. Please have a look, try them
out and give us feedback on <aclass="reference external" href="https://gitter.im/matplotlib/matplotlib">gitter</a>, <aclass="reference external" href="https://discourse.matplotlib.org">discourse</a>, or the <aclass="reference external" href="https://mail.python.org/mailman/listinfo/matplotlib-users">the mailing list</a>! But,
be aware that we may change the APIs without warning in subsequent