matplotlib.pyplot.title¶
-
matplotlib.pyplot.title(label, fontdict=None, loc='center', pad=None, **kwargs)[source]¶
Set a title for the 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.
| 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'
- pad : float
The offset of the title from the top of the axes, in points.
Default is None to use rcParams['axes.titlepad'].
|
| 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.
|
Examples using matplotlib.pyplot.title¶
© Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012 - 2018 The Matplotlib development team.
Last updated on Jan 05, 2020.
Created using
Sphinx 1.8.5.
Doc version v3.1.1-79-g90d53b526.