I wrote a function that took a dataframe generated from Pandas and produce a heatmap:
def drawHeatMap(df, city, province, collector, classtype, color, titlep
Short:
You just need to call pl.figure(figsize=...) before you call the pl.colorbar (and all the other stuff)
Explanation:
pl.figure creates a new figure (with given size), on which all pl.* methods will act in the following.
So pl.savefig just saves the last created figure, which is empty if you created a new one in the preceeding line.