0

This question/answer shows how to make part of a figure title or axis label bold. How do you change the font size of part of a title?

ax.set_xlabel('Unadjusted Font Size' + '\n' + r"$\bf{" + 'How do I make this part FontSize100?' + "}$")

Using Python 3.8

a11
  • 3,122
  • 4
  • 27
  • 66

1 Answers1

1

You can probably use:

plt.figtext(.5,.9,'Text 1', fontsize=100, ha='center')
plt.figtext(.5,.8,'Text 2',fontsize=30,ha='center')

You can read more about it here: https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.figtext.html

HARSH MITTAL
  • 750
  • 4
  • 17