Sometimes, we may want to save only portions of the figure, especially when the figure has multiple grids. In this recipe, we will learn how to do that.
Saving partial figures
Getting ready
Import the required libraries:
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.transforms import Bbox
How to do it...
The following code block plots a polar plot and histogram on two axes within the same figure. It then saves each plot separately to demonstrate saving part of the figure, instead of the full figure:
- Set the seed for repeatability and define the figure...