UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect. self.figure.tight_layout() code example
Example: axes not compatible with matplotlib pdf
# Give bbox_inches='tight' as argument in savefig
plt.savefig('fig.png',bbox_inches='tight')