In my experience, plt.tight_layout doesn’t always work but plt.savefig('fig.png',bbox_inches="tight") does. In addition, you don’t need the former after using the latter and I have come to the conclusion after some pretty extensive testing of it.