Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute.
The Axes.get_figure() function in axes module of matplotlib library is used to get the Figure instance the artist belongs to.
Parameters: This method does not accepts any parameter.
Returns: This method return the Figure instance the artist belongs to.
Below examples illustrate the matplotlib.axes.Axes.get_figure() function in matplotlib.axes:
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course