We will now look into what object-oriented interface matplotlib is. We will discuss the following topics:
- The object-oriented interface
- Creating figures with a grid of subplots
- Plotting using methods
In the object-oriented interface, what we need to do is create the object and call methods for every object in order to make changes specifically to that object. Let's look at a simple example, where a plot is created using the object-oriented interface. We usually use the plt.subplots function to create two objects at the same time. When we create a figure object, we usually call it fig, and an axis object is usually called an ax. In this case, the default function would be to produce a figure with one axis object, ...