| 1 | initial version |
You just need to modify your last line.
import matplotlib.pyplot as plt
plt.plot([1, 3, 2, 4])
plt.savefig('test.png')
You might want to include x-coordinates to the get plot you want.
import matplotlib.pyplot as plt
plt.plot([1,2,3,4],[1, 3, 2, 4])
plt.savefig('test.png')
Also, you can get a nice plot in Sage with list_plot that might do the job for you.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.