I have a pandas df which I wanted to color code so I used seaborn heatmap to get it done. Works fine for most of the part. But when I create multiple plots, it overlaps with earlier ones.
p = sns.heatmap(df, annot=True, linewidths=0.3, cmap='RdYlGn').set_title(title)
pl = p.get_figure()
pl.tight_layout()
pl.set_size_inches(dim)
pl.savefig(img_name)
This happens when I run this code on multiple dfs or run it with the same df multiple times.