This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
cs501r_f2016:lab2 [2016/09/02 04:44] wingated |
cs501r_f2016:lab2 [2016/09/02 04:44] wingated |
||
---|---|---|---|
Line 114: | Line 114: | ||
<code python> | <code python> | ||
import matplotlib.pyplot as plt | import matplotlib.pyplot as plt | ||
- | <code> | + | </code> |
To create a new figure, call ''plt.figure''. To plot a line, call ''plt.plot''. Note that if you pass a matrix into ''plt.plot'', it will plot multiple lines at once, each with a different color; each column will generate a new line. | To create a new figure, call ''plt.figure''. To plot a line, call ''plt.plot''. Note that if you pass a matrix into ''plt.plot'', it will plot multiple lines at once, each with a different color; each column will generate a new line. |