Working on non-trivial layouts

We will begin by looking at a subplot with one set of rows and three columns, as shown here:

# Standard Subplotplt.subplot(131)plt.subplot(132)plt.subplot(133)

The following is the output of the preceding input:

Now, by default, it will provide three plots side by side of equal size, but if we want them on top of each other instead, we will choose three rows and one column:

# Standard Subplotplt.subplot(311)plt.subplot(312)plt.subplot(313)

We will get the following output:

But what if these plots aren't necessarily ...

Get Mastering Matplotlib 2.x now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.