Change the Pie Chart Title Font Size in Matplotlib

To change the matplotlib pie chart title font size, pass fontsize to ax.set_title() or plt.title(), for example fontsize=18.

A pie has no axis labels, so its title carries the message, yet it’s only 12 points by default. I’ll show you four ways to size it.

The Sample Budget Data for These Pie Charts

Every example imports budget.py: a made-up 2026 Austin household budget, $5,300.00 in March. New to pies? See my Matplotlib pie chart tutorial.

# Austin, TX household budget, 2026 (USD)
labels = ["Housing", "Food", "Transport", "Utilities",
          "Savings", "Other"]
march = [2150.00, 865.40, 612.75, 318.20, 900.00, 453.65]
april = [2150.00, 902.15, 580.30, 291.85, 950.00, 425.70]
if __name__ == "__main__":
    print(f"March total: ${sum(march):,.2f}")

Output:

March total: $5,300.00

Method 1: Set the Pie Chart Title Size with fontsize (Recommended)

For one chart, here’s the code on the same March data:

import matplotlib.pyplot as plt
from budget import labels, march

fig, ax = plt.subplots(figsize=(6, 5))
ax.pie(march, labels=labels, autopct="%1.0f%%", startangle=90)
t = ax.set_title("March 2026 Household Budget")
print("Default:", t.get_fontsize())

t = ax.set_title("March 2026 Household Budget", fontsize=18)
print("fontsize=18:", t.get_fontsize())
plt.show()

Output:

Default: 12.0
fontsize=18: 18.0

The title starts at 12.0 points and jumps to 18.0 once fontsize=18 is passed.

Matplotlib plot window showing a March 2026 household budget pie chart with an 18-point title
The 18-point title now stands out clearly above the six budget wedges.

How does this code work?

ax.set_title() returns a Text object, and get_fontsize() reports its real size in points.

A number is a point size; a name like "x-large" (14.4 points) scales the 10-point base font. More in my Matplotlib title font size guide.

Method 2: Style and Resize an Existing Pie Chart Title

If a helper already drew the title, resize it with set_fontsize(). Same budget data, Housing pulled out:

import matplotlib.pyplot as plt
from budget import labels, march

fig, ax = plt.subplots(figsize=(6, 5))
ax.pie(march, labels=labels, autopct="%1.0f%%", startangle=90,
       explode=[0.08, 0, 0, 0, 0, 0],
       textprops={"fontsize": 10})
title = ax.set_title("Where $5,300 Went in March 2026",
                     fontweight="bold", color="#1F3B5C",
                     family="serif", pad=20)
title.set_fontsize(20)
print(title.get_fontsize(), title.get_fontweight())
plt.show()

Output:

20.0 bold

You get a 20.0-point bold serif title, though set_title() never got a size.

Matplotlib plot window showing a pie chart with a bold 20-point serif title and an exploded Housing wedge
The bold serif title sits well above the exploded Housing wedge.

How does this code work?

set_title() takes any text property as a keyword. pad=20 adds 20 points of space above the pie.

set_fontsize(20) resizes the object. textprops only sizes wedge labels; see pie chart autopct formatting.

Method 3: Change Every Pie Chart Title with rcParams

For many charts, set the size once before plotting. Same six categories; the helper builds a fresh pie each time:

import matplotlib.pyplot as plt
from budget import labels, march

def title_size():
    fig, ax = plt.subplots()
    ax.pie(march, labels=labels)
    size = ax.set_title("March 2026").get_fontsize()
    plt.close(fig)
    return round(size, 1)

print("Out of the box:", title_size())
plt.rc("axes", titlesize=16)
print("axes.titlesize=16:", title_size())
plt.rcParams["axes.titlesize"] = "large"
plt.rcParams["font.size"] = 14
print("font.size=14, large:", title_size())

Output:

Out of the box: 12.0
axes.titlesize=16: 16.0
font.size=14, large: 16.8
VS Code output showing pie chart title sizes of 12.0, 16.0 and 16.8 points after rcParams changes
Each rcParams change shows up in the next pie chart’s title size.

How does this code work?

plt.rc("axes", titlesize=16) sets axes.titlesize. Raising font.size to 14 scales named sizes, so "large" becomes 16.8 points.

Important: rcParams only affect titles drawn later; plt.rcdefaults() undoes them.

Method 4: Font Sizes for Multiple Pie Charts and a suptitle

Comparing months? See my multiple pie charts guide for layout. Same budget file, March next to April:

import matplotlib.pyplot as plt
from budget import labels, march, april

fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(10, 5),
                               layout="constrained")
for ax, data, month in [(ax1, march, "March"),
                        (ax2, april, "April")]:
    ax.pie(data, autopct="%1.0f%%", startangle=90)
    ax.set_title(f"{month} 2026", fontsize=15)

fig.legend(labels, loc="lower center", ncols=6)
sup = fig.suptitle("Household Budget, Spring 2026",
                   fontsize=22, fontweight="bold")
print("pie titles:", ax1.title.get_fontsize(),
      ax2.title.get_fontsize())
print("suptitle:", sup.get_fontsize())
plt.show()

Output:

pie titles: 15.0 15.0
suptitle: 22.0

Both pie titles are 15.0 points; the figure title is 22.0.

Matplotlib plot window showing March and April 2026 budget pie charts with 15-point titles and a bold 22-point suptitle
Two 15-point month titles sit under one bold 22-point figure title.

How does this code work?

fig.suptitle() follows figure.titlesize, not axes.titlesize. For grids, read subplot title font size and bold.

Which Method Should You Use for a Pie Chart Title?

  • One chart: Method 1, no side effects.
  • Title already drawn: Method 2.
  • Many charts: Method 3, set once.
  • Pies side by side: Method 4.

I’d use Method 1 most days. Then save the pie chart as a PNG.

Things to Keep in Mind with Pie Chart Title Font Size

Watch for these when you size pie titles:

  • rcParams set late: an existing title stays 12.0 points.
  • Unknown size names: "huge" raises a ValueError. Stick to "xx-small" through "xx-large".
  • Title hits a wedge: add pad=.
  • textprops: sizes wedge labels only. Same fixes for bar chart title font size.

Want to keep styling this chart? Try these next:

Frequently asked questions

How do I change the title font size of a pie chart in Matplotlib?

Use ax.set_title("Budget", fontsize=18).

What is the default pie chart title size in Matplotlib?

12 points ("large", 1.2 times the 10-point base).

How do I make a pie chart title bold?

Add fontweight="bold" to set_title() or plt.title().

Can I change the title size after the pie chart is drawn?

Yes, call set_fontsize(20) on the title object.

Does textprops change the pie chart title?

No, it only styles wedge labels and percentages.

Where is the pie function documented?

Leave a Comment