I wrote a function that took a dataframe generated from Pandas and produce a heatmap:
def drawHeatMap(df, city, province, collector, classtype, color, titlep
before calling pl.savefig(fileName) do plt.tight_layout()
pl.savefig(fileName)
plt.tight_layout()