Tutorials#

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.

For shorter examples, see our examples page. You can also find external resources and a FAQ in our user guide.

Introductory#

These tutorials cover the basics of creating visualizations with Matplotlib, as well as some best-practices in using the package effectively.

Pyplot tutorial

Pyplot tutorial

Pyplot tutorial
Image tutorial

Image tutorial

Image tutorial
The Lifecycle of a Plot

The Lifecycle of a Plot

The Lifecycle of a Plot
Customizing Matplotlib with style sheets and rcParams

Customizing Matplotlib with style sheets and rcParams

Customizing Matplotlib with style sheets and rcParams
Quick start guide

Quick start guide

Quick start guide

Intermediate#

These tutorials cover some of the more complicated classes and functions in Matplotlib. They can be useful for particular custom and complex visualizations.

Artist tutorial

Artist tutorial

Artist tutorial
Legend guide

Legend guide

Legend guide
Styling with cycler

Styling with cycler

Styling with cycler
Constrained Layout Guide

Constrained Layout Guide

Constrained Layout Guide
Tight Layout guide

Tight Layout guide

Tight Layout guide
Arranging multiple Axes in a Figure

Arranging multiple Axes in a Figure

Arranging multiple Axes in a Figure
Autoscaling

Autoscaling

Autoscaling
*origin* and *extent* in `~.Axes.imshow`

origin and extent in imshow

*origin* and *extent* in `~.Axes.imshow`

Advanced#

These tutorials cover advanced topics for experienced Matplotlib users and developers.

Faster rendering by using blitting

Faster rendering by using blitting

Faster rendering by using blitting
Path Tutorial

Path Tutorial

Path Tutorial
Path effects guide

Path effects guide

Path effects guide
Transformations Tutorial

Transformations Tutorial

Transformations Tutorial

Colors#

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.

For even more information see the examples page.

Specifying Colors

Specifying Colors

Specifying Colors
Customized Colorbars Tutorial

Customized Colorbars Tutorial

Customized Colorbars Tutorial
Creating Colormaps in Matplotlib

Creating Colormaps in Matplotlib

Creating Colormaps in Matplotlib
Colormap Normalization

Colormap Normalization

Colormap Normalization
Choosing Colormaps in Matplotlib

Choosing Colormaps in Matplotlib

Choosing Colormaps in Matplotlib

Provisional#

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 gitter, discourse, or the the mailing list! But, be aware that we may change the APIs without warning in subsequent versions.

Complex and semantic figure composition

Complex and semantic figure composition

Complex and semantic figure composition

Text#

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.

Text in Matplotlib Plots

Text in Matplotlib Plots

Text in Matplotlib Plots
Text properties and layout

Text properties and layout

Text properties and layout
Annotations

Annotations

Annotations
Writing mathematical expressions

Writing mathematical expressions

Writing mathematical expressions
Text rendering with XeLaTeX/LuaLaTeX via the ``pgf`` backend

Text rendering with XeLaTeX/LuaLaTeX via the pgf backend

Text rendering with XeLaTeX/LuaLaTeX via the ``pgf`` backend
Text rendering with LaTeX

Text rendering with LaTeX

Text rendering with LaTeX

Toolkits#

These tutorials cover toolkits designed to extend the functionality of Matplotlib in order to accomplish specific goals.

Overview of :mod:`mpl_toolkits.axes_grid1`

Overview of mpl_toolkits.axes_grid1

Overview of :mod:`mpl_toolkits.axes_grid1`
Overview of axisartist toolkit

Overview of axisartist toolkit

Overview of axisartist toolkit
The mplot3d Toolkit

The mplot3d Toolkit

The mplot3d Toolkit

Gallery generated by Sphinx-Gallery