Saved image from google colab shows empty white space with noting on it

1k views Asked by At

I tried saving the plot with following code

from google.colab import files
.....
plt.savefig('/content/drive/MyDrive/Project/firstone.jpeg' ,dpi=200,format='jpeg',bbox_inches='tight')
files.download('firstone.jpeg')

An image is saved but, it's with a blank white space with nothing on it, downloaded image is also same.

1

There are 1 answers

1
SWARNENDU On

I was facing the same issue when I was trying to plot violin plots for my data using seaborn. I was not quite sure but I removed the plt.show() before this exact few lines as you have mentioned and it worked.

Hope this helps you.