Coding shortcuts
Matplotlib's primary and universal API is the Axes interface. While it is clearly structured and powerful, it can sometimes feel overly verbose and thus cumbersome to write. This page collects patterns for condensing the code of the Axes-based API and achieving the same results with less typing for many simpler plots.
This tutorial goes the other way round, starting from the standard verbose Axes interface and using its capabilities for shortcuts when you don't need all the generality.
Let's assume we want to make a plot of the number of daylight hours per day over the year in London.



