I wrote a function that took a dataframe generated from Pandas and produce a heatmap:
def drawHeatMap(df, city, province, collector, classtype, color, titlep
I added plt.tight_layout() before savefig(), and it solved the trimming issue I had. Maybe it will help yours as well.
plt.tight_layout()
savefig()
EDIT: I also set the figure size at the begining rcParams['figure.figsize'] = 40, 12(you can set your own width and height)
rcParams['figure.figsize'] = 40, 12