Set one title explicitly
For an existing Axes called ax, ax.set_title("Measured change", fontsize=16) sets a title-size example. The current API recommends individual keyword arguments rather than passing the fontdict parameter directly.
Sixteen is an illustrative choice, not a required chart style. Compare the title with axis labels, ticks and legend text in the actual figure.
Choose a default before creating the text
A setting such as plt.rcParams["font.size"] = 11 changes the default text-size configuration for subsequent use in that plotting context. Matplotlib also has role-specific configuration, including title settings.
An explicit artist property can differ from a general default. Do not assume changing one global value will retroactively rewrite every already-created label.
Understand size and font matching
The font-manager documentation defines numeric font sizes in points and also supports named sizes relative to the default. Font family, style and weight are separate matching properties.
A missing requested family can lead to a different available resource. If typography matters to a shared figure, keep the chosen font and environment details with the project.
Judge the exported figure
Inspect a dense tick label, a long title and mathematical notation at the intended publication size. Resizing a figure after export changes the apparent scale of all its content.
Use the font-size converter for nominal unit comparisons and monospaced font collection for actual family background. This page supplies examples to adapt, rather than running Python inside your browser.
Your questions, answered.
Is fontsize measured in pixels?
The font-manager documentation defines numeric sizes in points. Export dimensions and later image scaling affect the apparent result.
Will a default size necessarily override an explicit title size?
No. An explicitly set text property can differ from a general default. Choose the scope deliberately.
Sources & background
Sources supporting this page’s explanations. Practical examples are our editorial suggestions.