plt savefig white code example Example: pyplot saves empty image fig1 = plt.gcf() plt.show() plt.draw() fig1.savefig('tessstttyyy.png', dpi=100)