3

I can see that you can add a title to each subplot, as discussed here:

How to add title to subplots in Matplotlib?

Is there a way to add an overall title in addition to the subplot titles?

overall title

Community
  • 1
  • 1
J4y
  • 639
  • 6
  • 21

2 Answers2

11

using

fig = plt.figure()
fig.suptitle('this is the figure title')
Nils Werner
  • 34,832
  • 7
  • 76
  • 98
4
fig = plt.figure()
plt.title('overall')
ax1 = fig.add_subplot(221)
ax2 = fig.add_subplot(222)
ax3 = fig.add_subplot(223)
ax4 = fig.add_subplot(224)
ax1.title.set_text('First Plot')
ax2.title.set_text('Second Plot')
ax3.title.set_text('Third Plot')
ax4.title.set_text('Fourth Plot')
plt.show()

everything but the second line is copied from the link you posted.

Tested with python 2.7

Glostas
  • 1,090
  • 2
  • 11
  • 21