Figure
noun
say it: “FIG-yer” /ˈfɪɡjər/
In matplotlib, the whole image a chart is drawn on, which can hold one or more charts and is what gets saved as a file.
What is a Figure in matplotlib?
In matplotlib, a Figure is the whole picture that gets saved: like a sheet of paper with one or more charts
(Axes) drawn on it. fig.savefig() saves it as a file.
import matplotlib.pyplot as plt
fig, ax = plt.subplots() # a Figure with one Axes
ax.plot([1, 2, 3], [5200, 8100, 6400])
fig.savefig("steps.png") # saves the whole Figure
In a sentence
- “The Figure held two charts side by side.”
- “She saved the Figure as sales.png.”
Level: Journeyman · More Python terms at this level
Updated