plt.savefig() outputs blank image
in
The Complete Data Visualization Course with Python, R, Tableau, and Excel
/
Bar Chart - Python - How to Create a Bar Chart
Not a question, but two remarks:
- After plt.show() is called, a new figure is created. To deal with this, you can call plt.savefig("your_image.png") before you call plt.show()
- With an image of size (9, 6), the absissa legend is cut. An image of size (15, 10) fixes the problem.
2 answers ( 0 marked as helpful)
Hi cmarquay,
thanks for pointing this out and for being a part of the data viz course!
Best
365 Eli
Hey Christian
Thanks a lot for this observation!