Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot elements.
The align_labels() method figure module of matplotlib library is used to Align the xlabels and ylabels of subplots with the same subplots row or column if label alignment is being done automatically.
Syntax: align_labels(self, axs=None)
Parameters: This accept the following parameters that are described below:
- axs : This parameter is the list of Axes to align the labels.
Returns: This method does not return any value.
Below examples illustrate the matplotlib.figure.Figure.align_labels() function in matplotlib.figure:
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.