ax = plt.axes([0.0, 0.0, 1.0, 0.8], frameon=False, xticks=[], yticks=[])
ax.imshow(img, interpolation='none')
ax.set_title('Matplotlib is fun!', size=16, weight='bold')
plt.savefig('D:\\mpl_logo_with_title.png', dpi=dpi)
Setting the size of the plotting canvas in Matplotlib