axes.Axes.set_title

matplotlib.axes.Axes.set_title

Axes.set_title(label, fontdict=None, loc='center', **kwargs)

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’

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.

© 2012–2017 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
http://matplotlib.org/2.0.2/api/_as_gen/matplotlib.axes.Axes.set_title.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部