Answers for "matplotlib chart export options"

2

save plot in python

plt.savefig('books_read.png')
Posted by: Guest on April-28-2020
0

python save figure as pdf

import matplotlib.pyplot as plt

f = plt.figure()
plt.plot(range(10), range(10), "o")
plt.show()

f.savefig("foo.pdf", bbox_inches='tight')
Posted by: Guest on July-17-2020

Python Answers by Framework

Browse Popular Code Answers by Language