Search⌘ K

Other Methods for Drawing a Figure

Explore three distinct methods for drawing figures in Matplotlib, including using the pyplot module for quick plots, axes objects for flexible subplots, and figure objects for detailed control. Understand how to plot data using each approach to enhance your charting skills before learning to customize specific plot elements like ticks.

There is more than one way to draw a figure. In the previous lessonn, we learned how to draw a figure using the formal method. Now, let’s compare a few alternative methods for drawing a figure in order to observe the differences between them.

How to plot from the pyplot module

Using the pyplot module is the simplest method when we want to plot a single figure using (x, y). If we want to get a simple image quickly, we can call the function plot from the pyplot ...