Recently, while working on a data visualization project for a U.S.-based retail company, I needed to create a pie chart in Python using Matplotlib that clearly displayed sales distribution across states.
The chart looked great, but the title font size was too small; it didn’t stand out in presentations or reports. I realized that many Python users face the same issue when customizing their Matplotlib charts.
So, in this tutorial, I’ll show you how to change the pie chart title font size in Matplotlib, step by step. I’ll also cover a few different methods to give you flexibility depending on your needs.
What is a Pie Chart in Python Matplotlib?
A pie chart is a circular statistical graphic divided into slices to illustrate numerical proportions. In Python’s Matplotlib library, the pie() function is used to create these charts easily.
Each slice of the pie represents a category, and the size of the slice corresponds to its proportion in the dataset. For example, if you’re analyzing market share by brand or sales by region, a pie chart is a great visual choice.
Adjust the Pie Chart Title Font Size
By default, Matplotlib titles often appear with small font sizes. When you’re preparing visuals for reports or dashboards, a small title can make your chart look unprofessional or hard to read.
Increasing the title font size makes your chart more readable and visually appealing, especially when you’re sharing your Python plots in PowerPoint, PDFs, or dashboards.
Method 1 – Use the fontsize Parameter in plt.title()
The simplest and most direct way to change the pie chart title font size in Matplotlib is by using the fontsize argument inside the plt.title() function.
Let’s go through a practical Python example.
Example: Change Pie Chart Title Font Size Using fontsize
import matplotlib.pyplot as plt
# Data for the pie chart
labels = ['California', 'Texas', 'New York', 'Florida', 'Illinois']
sales = [350, 250, 200, 150, 100]
# Create a pie chart
plt.pie(sales, labels=labels, autopct='%1.1f%%', startangle=90)
# Add a title with a custom font size
plt.title('Sales Distribution by State - 2025', fontsize=20)
# Display the chart
plt.show()I executed the above example code and added the screenshot below.

In this example, I used fontsize=20 to make the chart title stand out. You can adjust this number to suit your design, for instance, try fontsize=16 for smaller visuals or fontsize=24 for larger ones.
This method works perfectly when you just need to change the title font size without altering other style attributes.
Method 2 – Use fontdict for More Control
If you want more control over your title’s appearance, such as changing the font weight, color, or family, you can use the fontdict parameter in the plt.title() function.
This approach is useful when you want to maintain consistent styling across multiple charts in your Python project.
Example: Customize Title Font Using fontdict
import matplotlib.pyplot as plt
# Data for the pie chart
labels = ['East', 'West', 'North', 'South']
revenue = [40000, 30000, 25000, 20000]
# Create a pie chart
plt.pie(revenue, labels=labels, autopct='%1.1f%%', shadow=True, startangle=140)
# Define font dictionary
title_font = {
'family': 'serif',
'color': 'darkblue',
'weight': 'bold',
'size': 22
}
# Add title with fontdict
plt.title('Regional Revenue Breakdown (in USD)', fontdict=title_font)
# Display the chart
plt.show()I executed the above example code and added the screenshot below.

In this Python example, I used a serif font, bold weight, and dark blue color for the title. The font size is set to 22, giving the chart a professional and polished look.
This method is great when you want to apply corporate branding or standardized styles across multiple Matplotlib charts.
Method 3 – Use rcParams to Set Global Font Size
If you’re working on multiple pie charts in a single Python script or Jupyter Notebook, you might not want to set the title font size manually for each chart.
In such cases, you can use Matplotlib’s rcParams to define a global font size for all titles. This ensures consistency and saves time.
Example: Set Global Title Font Size Using rcParams
import matplotlib.pyplot as plt
import matplotlib as mpl
# Set global font size for all titles
mpl.rcParams['axes.titlesize'] = 24
# Data for the pie chart
labels = ['Online', 'In-Store', 'Wholesale']
sales_channel = [50000, 30000, 20000]
# Create the pie chart
plt.pie(sales_channel, labels=labels, autopct='%1.1f%%', startangle=90)
# Add the title (will automatically use rcParams size)
plt.title('Sales Channels Distribution')
plt.show()I executed the above example code and added the screenshot below.

Here, I used mpl.rcParams[‘axes.titlesize’] = 24, which automatically applies to all subsequent titles in the session.
This is my go-to method when building Python dashboards or automated reports using Matplotlib, as it keeps all chart titles uniform.
Method 4 – Change Title Font Size in Object-Oriented Matplotlib
If you prefer using the object-oriented approach in Matplotlib (which is common in production-level Python code), you can modify the title font size using the ax.set_title() method.
This approach is ideal when you’re working with multiple subplots or complex figure layouts.
Example: Change Title Font Size Using ax.set_title()
import matplotlib.pyplot as plt
# Create figure and axis
fig, ax = plt.subplots()
# Data for the pie chart
labels = ['Electronics', 'Furniture', 'Clothing', 'Groceries']
spending = [45, 25, 15, 15]
# Create a pie chart
ax.pie(spending, labels=labels, autopct='%1.1f%%', startangle=90)
# Add title using object-oriented syntax
ax.set_title('Household Spending Breakdown (USA)', fontsize=18, color='darkgreen')
# Display the chart
plt.show()I executed the above example code and added the screenshot below.

This method gives you precise control over individual chart elements. For example, you can adjust the font size of one chart while keeping others unchanged in the same figure.
If you’re building dashboards with multiple visualizations, this approach is highly recommended.
Bonus Tip – Adjust Title Position and Alignment
Sometimes, even after increasing the font size, your title might look slightly off-center, especially if your chart has labels or legends.
You can fix this by using the pad and loc parameters in plt.title() or ax.set_title().
Example: Adjust Title Position in Matplotlib Pie Chart
import matplotlib.pyplot as plt
# Data
labels = ['Northeast', 'Midwest', 'South', 'West']
population = [58, 68, 125, 78]
# Create pie chart
plt.pie(population, labels=labels, autopct='%1.1f%%', startangle=100)
# Adjust title position and size
plt.title('US Population Distribution by Region', fontsize=20, loc='left', pad=30)
plt.show()Here, loc=’left’ aligns the title to the left, and pad=30 adds extra space above the chart. These small tweaks can make a big difference in presentation quality.
Pro Tips for Better Pie Charts in Python Matplotlib
- Avoid too many slices: Keep your pie chart simple — ideally, fewer than six categories.
- Use contrasting colors: Ensure each slice is easily distinguishable.
- Add percentages: Use autopct=’%1.1f%%’ for clear numeric representation.
- Maintain consistent font sizes: Titles, labels, and legends should have balanced proportions.
- Test readability: Always view your chart on different screen sizes before finalizing.
So that’s how I change the pie chart title font size in Matplotlib using Python.
You can use the fontsize parameter for quick adjustments, fontdict for detailed styling, rcParams for global settings, or the object-oriented approach for fine control.
Each method has its place. I personally use rcParams when building dashboards and fontdict when designing presentation-ready visuals.
With these techniques, your Matplotlib pie charts will not only look professional but also communicate information more effectively.
You may also like to read:
- Save NumPy Array as PNG Image in Python Matplotlib
- Save a Matplotlib Plot as PNG Without Borders in Python
- How to Save a Matplotlib Axis as PNG in Python
- How to Save Matplotlib Chart as PNG

I am Bijay Kumar, a Microsoft MVP in SharePoint. Apart from SharePoint, I started working on Python, Machine learning, and artificial intelligence for the last 5 years. During this time I got expertise in various Python libraries also like Tkinter, Pandas, NumPy, Turtle, Django, Matplotlib, Tensorflow, Scipy, Scikit-Learn, etc… for various clients in the United States, Canada, the United Kingdom, Australia, New Zealand, etc. Check out my profile.