I have produced a heatmap with seaborn, and it looks like as following in ipython notebook:
But when I tried to save it by the following way:
fig = plt.get_figure()
fig.savefig('heatmap.png')
Just part of the figure is saved and some of the labels of y-axis are lost:
Could you please tell me how to save the whole figure? Thanks in advance!
Try fig.savefig('heartmap.png',bbox_inches='tight')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With