July 2017
Beginner to intermediate
420 pages
10h 56m
English
If I want to save this graph to a file, maybe I want to include it in a document or something, I can do something like the following code:
plt.plot(x, norm.pdf(x))
plt.plot(x, norm.pdf(x, 1.0, 0.5))
plt.savefig('C:\\Users\\Frank\\MyPlot.png', format='png')
Instead of just calling plt.show(), I can call plt.savefig() with a path to where I want to save this file and what format I want it in.
You'll want to change that to an actual path that exists on your machine if you're following along. You probably don't have a Users\Frank folder on your system. Remember too that if you're on Linux or macOS, instead of a backslash you're going to use forward slashes, and you're not going to have a drive letter. With all of these ...
Read now
Unlock full access