// the find
rougier/matplotlib-tutorial
Matplotlib tutorial for beginner
A classic, long-running tutorial that walks through matplotlib's pyplot interface via a series of exercises: default plots, customizing spines/ticks/legends, then quick-reference tables for line styles, markers, and colormaps, plus a couple of animation demos (rain drops, earthquake visualization). It's aimed at someone who has never touched matplotlib and wants a hands-on first pass, not at someone already comfortable with the library.
The exercise format (show default output, then incrementally refine it) is genuinely a good teaching device and better than most API-reference-style tutorials. The quick-reference tables for line styles, markers, and the full colormap list are handy enough that people bookmark this repo just for those. The animation section (FuncAnimation rain effect, then reused for the earthquake plot) is a nice progression from toy example to a real dataset.
It teaches the old MATLAB-style pyplot calls (plt.plot, plt.xticks) throughout and never introduces the object-oriented fig/ax API that the matplotlib docs themselves now recommend as the default — anyone learning from this will write code that's harder to compose into subplots later. Most documentation links point at matplotlib.sourceforge.net, which has been dead for over a decade, so half the 'Documentation' admonitions are broken. The earthquake example depends on basemap, a project that's been deprecated in favor of cartopy since roughly 2016 (the README even says so inline but keeps the basemap code as primary). Despite a 2024 last push, there's no indication the content itself was modernized — it reads like a frozen 2015-era tutorial with a maintenance commit on top.