You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 3.1.0.post1213+g63d96d286
Fork me on GitHub

Table of Contents


matplotlib.pyplot.suptitle(t, **kwargs)[source]

Add a centered title to the figure.

t : str

The title text.

x : float, default 0.5

The x location of the text in figure coordinates.

y : float, default 0.98

The y location of the text in figure coordinates.

horizontalalignment, ha : {'center', 'left', right'}, default: 'center'

The horizontal alignment of the text relative to (x, y).

verticalalignment, va : {'top', 'center', 'bottom', 'baseline'}, default: 'top'

The vertical alignment of the text relative to (x, y).

fontsize, size : default: rcParams["figure.titlesize"]

The font size of the text. See Text.set_size for possible values.

fontweight, weight : default: rcParams["figure.titleweight"]

The font weight of the text. See Text.set_weight for possible values.


The Text instance of the title.

Other Parameters:
fontproperties : None or dict, optional

A dict of font properties. If fontproperties is given the default values for font size and weight are taken from the FontProperties defaults. rcParams["figure.titlesize"] and rcParams["figure.titleweight"] are ignored in this case.


Additional kwargs are matplotlib.text.Text properties.


>>> fig.suptitle('This is the figure title', fontsize=12)

Examples using matplotlib.pyplot.suptitle