You are reading an old version of the documentation (v2.1.2). For the latest version see https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.title.html
Version 2.1.2
matplotlib
Fork me on GitHub


Travis-CI:

Table Of Contents

This Page

matplotlib.pyplot.title

matplotlib.pyplot.title(s, *args, **kwargs)

Set a title of the current axes.

Set one of the three available axes titles. The available titles are positioned above the axes in the center, flush with the left edge, and flush with the right edge.

See also

See text() for adding text to the current axes

Parameters:

label : str

Text to use for the title

fontdict : dict

A dictionary controlling the appearance of the title text, the default fontdict is:

{‘fontsize’: rcParams[‘axes.titlesize’], ‘fontweight’ : rcParams[‘axes.titleweight’], ‘verticalalignment’: ‘baseline’, ‘horizontalalignment’: loc}

loc : {‘center’, ‘left’, ‘right’}, str, optional

Which title to set, defaults to ‘center’

Returns:

text : Text

The matplotlib text instance representing the title

Other Parameters:
 

kwargs : text properties

Other keyword arguments are text properties, see Text for a list of valid text properties.