I was working on a project for a retail analytics client in the USA, where I needed to create a bar chart in Python using Matplotlib. The chart looked great, but the title font size was too small compared to the rest of the visualization.
If you’ve ever faced this issue, you’ve probably realized that Matplotlib doesn’t automatically adjust the title font size to fit your chart style. So, I decided to explore different ways to change the title font size in a Matplotlib bar chart, and in this article, I’ll show you exactly how to do it.
I’ll walk you through multiple methods, including setting the font size directly while adding a title, modifying global font parameters, and customizing font properties for more control.
Method 1 – Change Bar Chart Title Font Size Using the fontsize Parameter
The easiest way to change the bar chart title font size in Python’s Matplotlib is by using the fontsize parameter inside the plt.title() function.
This method is perfect when you want to quickly adjust the font size without altering other text elements in your chart.
Here’s how I usually do it:
# Import the required library
import matplotlib.pyplot as plt
# Data for the bar chart
states = ['California', 'Texas', 'Florida', 'New York', 'Illinois']
sales = [120, 95, 75, 60, 50]
# Create the bar chart
plt.bar(states, sales, color='skyblue')
# Add the title with a custom font size
plt.title("Monthly Sales by State (USA)", fontsize=20)
# Label the axes
plt.xlabel("State", fontsize=12)
plt.ylabel("Sales (in Thousands)", fontsize=12)
# Display the chart
plt.show()I have executed the above example code and added the screenshot below.

When I run this code, the title appears clearly above the chart with a font size of 20, making it stand out perfectly.
Method 2 – Change Font Size Using rcParams (Global Settings)
If you’re working on multiple charts and want all your Matplotlib bar chart titles to have a consistent font size, you can use the rcParams configuration.
This method changes the font size globally, so every chart you create afterward will follow the same style.
Here’s how you can set it up:
import matplotlib.pyplot as plt
# Change global font settings
plt.rcParams['axes.titlesize'] = 22 # Set title font size globally
plt.rcParams['axes.labelsize'] = 14 # Set axis label size globally
# Data for the bar chart
categories = ['Electronics', 'Groceries', 'Clothing', 'Furniture', 'Toys']
revenue = [200, 150, 180, 120, 90]
# Create the bar chart
plt.bar(categories, revenue, color='orange')
# Add title and labels
plt.title("Quarterly Revenue by Category", fontweight='bold')
plt.xlabel("Product Category")
plt.ylabel("Revenue (in Millions USD)")
# Display the chart
plt.show()I have executed the above example code and added the screenshot below.

After applying this, every chart I create in the same Python session will use the same title font size (22 in this case).
This method is ideal when you’re preparing multiple visualizations for a report or presentation and want them to look uniform.
Method 3 – Customize Font Properties Using a Dictionary
Sometimes, I like to have more control over the font style, color, and weight of the title, not just its size.
In such cases, I use the fontdict parameter inside plt.title(). This allows me to pass a dictionary containing all font customization options.
Here’s an example:
import matplotlib.pyplot as plt
# Data for the bar chart
months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
profits = [45, 60, 55, 70, 80, 90]
# Define font properties
title_font = {
'family': 'serif',
'color': 'darkblue',
'weight': 'bold',
'size': 24
}
# Create the bar chart
plt.bar(months, profits, color='lightgreen')
# Add the title with custom font properties
plt.title("Half-Yearly Profit Growth (2025)", fontdict=title_font)
# Add labels
plt.xlabel("Month", fontsize=12)
plt.ylabel("Profit (in Thousands USD)", fontsize=12)
# Display the chart
plt.show()I have executed the above example code and added the screenshot below.

This approach gives me complete flexibility to style my chart titles to match brand guidelines or presentation themes.
You can experiment with different font families like ‘serif’, ‘monospace’, or ‘sans-serif’ to get the desired look.
Method 4 – Adjust Title Font Size Using ax.set_title() (Object-Oriented Approach)
If you prefer the object-oriented style of Matplotlib (which I often use in larger Python projects), you can set the title font size using the Axes object’s set_title() method.
Here’s how to do it:
import matplotlib.pyplot as plt
# Data for the bar chart
cities = ['Los Angeles', 'Chicago', 'Houston', 'Phoenix', 'Philadelphia']
population = [3.9, 2.7, 2.3, 1.7, 1.6]
# Create a figure and axis
fig, ax = plt.subplots()
# Create the bar chart
ax.bar(cities, population, color='lightcoral')
# Add title using the object-oriented approach
ax.set_title("Population of Major U.S. Cities (in Millions)", fontsize=18, fontweight='bold')
# Add labels
ax.set_xlabel("City", fontsize=12)
ax.set_ylabel("Population", fontsize=12)
# Show the chart
plt.show()I have executed the above example code and added the screenshot below.

I often use this method when I’m working with multiple subplots or need to manage several charts within one figure.
Method 5 – Change Font Size for Multiple Subplot Titles
When I’m creating dashboards or comparative charts, I often use subplots to display multiple bar charts side by side.
To control the title font size for each subplot, I use set_title() for each axis object individually.
Here’s a quick example:
import matplotlib.pyplot as plt
# Data for two bar charts
quarters = ['Q1', 'Q2', 'Q3', 'Q4']
east_sales = [100, 120, 130, 150]
west_sales = [90, 110, 125, 140]
# Create subplots
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(10, 5))
# Plot bar charts
ax1.bar(quarters, east_sales, color='dodgerblue')
ax2.bar(quarters, west_sales, color='tomato')
# Add titles with different font sizes
ax1.set_title("East Coast Sales", fontsize=16)
ax2.set_title("West Coast Sales", fontsize=20)
# Add overall figure title
fig.suptitle("Quarterly Sales Comparison (2025)", fontsize=22, fontweight='bold')
# Display the charts
plt.tight_layout()
plt.show()This technique helps me keep my visualizations consistent while still emphasizing specific plots when needed.
Bonus Tip – Use plt.suptitle() for Figure-Level Titles
If you’re dealing with multiple subplots, you can also use plt.suptitle() to add a single, large title for the entire figure.
You can control the font size here just like before:
import matplotlib.pyplot as plt
# Create figure and subplots
fig, axes = plt.subplots(2, 1, figsize=(8, 8))
# Sample data
categories = ['A', 'B', 'C', 'D']
data1 = [50, 70, 60, 80]
data2 = [40, 55, 65, 75]
# Plot bar charts
axes[0].bar(categories, data1, color='teal')
axes[1].bar(categories, data2, color='purple')
# Add subplot titles
axes[0].set_title("Dataset 1", fontsize=14)
axes[1].set_title("Dataset 2", fontsize=14)
# Add a figure-level title
plt.suptitle("Comparison of Two Datasets", fontsize=24, fontweight='bold')
# Adjust layout
plt.tight_layout()
plt.show()This gives your entire figure a professional, unified appearance, something I always aim for when preparing Python-based reports.
Common Mistakes to Avoid
- Using very large font sizes can cause overlapping with other chart elements.
- Always call plt.tight_layout() after setting titles to prevent text from getting cut off.
- If you’re creating multiple charts, remember that global settings (rcParams) will affect all of them.
As someone who has worked with Python and Matplotlib for over a decade, I can confidently say that small design tweaks like adjusting the title font size can make a huge difference in how your charts are perceived.
Whether you’re building a quick visualization for analysis or preparing a presentation for stakeholders, ensuring your bar chart titles are clear and readable is key to effective data storytelling.
Both the quick fontsize parameter and the more advanced fontdict or rcParams methods are great options; choose the one that fits your workflow best.
You may also like to read:
- 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
- Change the Pie Chart Title Font Size in Matplotlib

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.