Take, for instance, this code sample:
import numpy as np
import matplotlib.pyplot as plt
f = np.random.random(100)
g = np.random.random(100)
fig = plt.figure(figsize=(15,15))
fig.suptitle('Long Suptitle', fontsize=24)
plt.subplot(121)
plt.plot(f)
plt.title('Very Long Title 1', fontsize=20)
plt.subplot(122)
plt.plot(g)
plt.title('Very Long Title 2', fontsize=20)
plt.subplots_adjust(top=0.85)
plt.show()
Running it shows two subplots with individual titles, but the overall figure title "Long Suptitle" is not visible.
However, if you remove figsize=(15,15)
, then the overall figure title becomes visible again.
Is it possible to keep the suptitle()
text visible while modifying the size of the figure?
y
position tosuptitle
. That shouldn't be necessary, though. – Reft