matplotlib.figure.SubFigure.align_titles#
- SubFigure.align_titles(axs=None)[source]#
Align the titles of subplots in the same subplot row if titlealignment is being done automatically (i.e. the title position isnot manually set).
Alignment persists for draw events after this is called.
- Parameters:
See also
Notes
This assumes that all Axes in
axsare from the sameGridSpec,so that theirSubplotSpecpositions correspond to figure positions.Examples
Example with titles:
fig,axs=plt.subplots(1,2)axs[0].set_aspect('equal')axs[0].set_title('Title 0')axs[1].set_title('Title 1')fig.align_titles()
On this page