How to change the font size in Matplotlib

You can change the font size in Matplotlib with the following code. If you want to learn Python then I will highly recommend you to read This Book.

How to change the font size in Matplotlib
How to change the font size in Matplotlib

How to change the font size of Title and Labels

from matplotlib import pyplot as plt

x = [1,2,3,4,5]
y = [7,14,21,28,35]

plt.title("Integers and Multiple", fontsize=25)
plt.xlabel("Integers", fontsize=20)
plt.ylabel("Multiple", fontsize=15)

plt.plot(x,y,color ='blue')
plt.show()
How to change the font size in Matplotlib

People are also reading:

Best Python Books

What is Computer Vision? Examples, Applications, Techniques

Top 10 Computer Vision Books with Python

Books for Machine Learning (ML)

Free Learning Resources

Leave a Comment

Your email address will not be published.