Introduction
This tutorial is a complete re-imagining of how one should teach users the matplotlib library. Hopefully, this tutorial may serve as inspiration for future restructuring of the matplotlib documentation. Plus, I have some ideas of how to improve this tutorial.
Please fork and contribute back improvements! Feel free to use this tutorial for conferences and other opportunities for training.
The tutorial can be viewed on nbviewer:
- Part 0: Introduction To NumPy
- Part 1: Overview of Matplotlib
- Part 2: Plotting Methods
- Part 3: How To Speak MPL
- Part 4: Limits, Legends, and Layouts
- Part 5: Artists
- Part 6: mpl_toolkits
Installation
All you need is matplotlib (v1.5 or greater) and jupyter installed. You can use your favorite Python package installer for this:
conda install matplotlib jupyter
git clone https://github.com/matplotlib/AnatomyOfMatplotlib.git
cd AnatomyOfMatplotlib
jupyter notebook
A browser window should appear and you can verify that everything works as expected by clicking on the Test Install.ipynb
notebook. There, you will see a "code cell" that you can execute. Run it, and you should see a very simple line plot, indicating that all is well.