matplotlib.axes.Axes.set_title#
- Axes.set_title(label, fontdict=None, loc=None, pad=None, *, y=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:
- labelstr
Text to use for the title
- fontdictdict
A dictionary controlling the appearance of the title text, the default fontdict is:
{'fontsize': rcParams['axes.titlesize'], 'fontweight': rcParams['axes.titleweight'], 'color': rcParams['axes.titlecolor'], 'verticalalignment': 'baseline', 'horizontalalignment': loc}
- loc{'center', 'left', 'right'}, default:
rcParams["axes.titlelocation"]
(default:'center'
) Which title to set.
- yfloat, default:
rcParams["axes.titley"]
(default:None
) Vertical Axes location for the title (1.0 is the top). If None (the default) and
rcParams["axes.titley"]
(default:None
) is also None, y is determined automatically to avoid decorators on the Axes.- padfloat, default:
rcParams["axes.titlepad"]
(default:6.0
) The offset of the title from the top of the Axes, in points.
- Returns:
Text
The matplotlib text instance representing the title
- Other Parameters:
Examples using matplotlib.axes.Axes.set_title
#
Filling the area between lines
Interactive Adjustment of Colormap Range
Contour plot of irregularly spaced data
Advanced quiver and quiverkey functions
Controlling view limits using margins and sticky_edges
Resizing axes with constrained layout
Resizing axes with tight layout
Figure labels: suptitle, supxlabel, supylabel
Creating multiple subplots using plt.subplots
Box plots with custom fill colors
Plot a confidence ellipse of a two-dimensional dataset
Different ways of specifying error bars
Including upper and lower limits in error bars
Using histograms to plot a cumulative distribution
Some features of the histogram (hist) function
The histogram (hist) function with multiple data sets
Using accented text in Matplotlib
Angle annotations on bracket arrows
Labeling ticks using engineering notation
Using a ttf font file in Matplotlib
Rendering math equations using TeX
Creating a colormap from a list of colors
Line, Poly and RegularPoly Collection with autoscaling
Bayesian Methods for Hackers style sheet
Make room for ylabel using axes_grid
Rasterization for vector graphics
3D wireframe plots in one direction
Radar chart (aka spider or star chart)
Custom tick formatter for time series
Move x-axis tick labels to the top
Rectangle and ellipse selectors