Matplotlib: Difference between revisions
Jump to navigation
Jump to search
Created page with "Using the pyplot functions only until now. ;import matplotlib.pyplot as plt :Get the pyplot library. We assume this is done in all examples on this page. ;plt.plot(results) :S..." |
mNo edit summary |
||
| Line 1: | Line 1: | ||
Using the pyplot functions only until now. | [[Category:Python]] | ||
[http://www.example.com link title]Using the pyplot functions only until now. | |||
;import matplotlib.pyplot as plt | ;import matplotlib.pyplot as plt | ||
:Get the pyplot library. We assume this is done in all examples on this page. | :Get the pyplot library. We assume this is done in all examples on this page. | ||
Revision as of 17:02, 15 December 2018
link titleUsing the pyplot functions only until now.
- import matplotlib.pyplot as plt
- Get the pyplot library. We assume this is done in all examples on this page.
- plt.plot(results)
- Show the graph if your environment (e.g. jupyter) supports it.
Selfexplaning example code:
plt.suptitle('Set the graph tilte')
plt.xlabel('Set the x label')
plt.ylabel('Set the y label')
plt.savefig('plot.png')
Show the image:
firefox plot.png
eog plot.png
shotwell plot.png