Matplotlib offers some special types of plots using patches and collections classes. In this recipe, we will learn how to use patches using the object-oriented API. In the next recipe, we will learn about collections.
Plotting patches using object-oriented API
Getting ready
We will need to import the following libraries for this recipe:
from IPython.core.display import display
from matplotlib.backends import backend_agg
from matplotlib.patches import Ellipse, Polygon
How to do it...
The following code block plots two patches as separate plots in the same figure:
- Define...