VOOZH about

URL: https://www.geeksforgeeks.org/python/matplotlib-axes-axes-get_figure-in-python/

⇱ Matplotlib.axes.Axes.get_figure() in Python - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Matplotlib.axes.Axes.get_figure() in Python

Last Updated : 12 Jul, 2025
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.

matplotlib.axes.Axes.get_figure() Function

The Axes.get_figure() function in axes module of matplotlib library is used to get the Figure instance the artist belongs to.
Syntax: Axes.get_figure(self) 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: Example 1: Output: 👁 Image
Example 2:
Output: 👁 Image
Comment