Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Big Data Hadoop & Spark by (19k points)

I'm working with Python matplotlib and this is the code:

  plt.title('Temperature \n Humidity')

How can I just increase the font size of temperature instead of both the temperature & the humdity?

I tried the following but it is not working :

 plt.title('Temperature \n Humidity', fontsize=100)

Any solution?

1 Answer

0 votes
by (33.1k points)

Simply use the following code :

import matplotlib.pyplot as plt

plt.figtext(.5,.9,'Temperature', fontsize=100, ha='center')

plt.figtext(.5,.8,'Humidity',fontsize=30,ha='center')

plt.show()

Hope this answer helps you!

Browse Categories

...