I tried saving my matplotlib graph using
plt.savefig('graph.pdf')
Yet, when I open the file it is blank. How can I save my graph properly?
I am doing something similar to this Left Ventricle Bull eye (AHA) matplotlib
I tried saving my matplotlib graph using
plt.savefig('graph.pdf')
Yet, when I open the file it is blank. How can I save my graph properly?
I am doing something similar to this Left Ventricle Bull eye (AHA) matplotlib
Try saving in with ".png" extension:
plt.savefig('graph.png')
Also, if you have plt.show() that it will end the instance and there will be nothing to save. Put saving before plt.show().