python save figure as pdf

Solutions on MaxInterview for python save figure as pdf by the best coders in the world

showing results for - "python save figure as pdf"
Enrico
08 Apr 2016
1import matplotlib.pyplot as plt
2
3f = plt.figure()
4plt.plot(range(10), range(10), "o")
5plt.show()
6
7f.savefig("foo.pdf", bbox_inches='tight')