matplotlib - How to plot two sets of data in python -


there 2 sets of data in 2 lists. lists x=[1,2,3,...,1000] , y=[0.12,0.59,-0.89,...,0.45].

i want plot them in xy coordinate. searched on net , figured out should download matplotlib , anaconda did. due fact new python user, not figure out how plot it.

here's simple example:

import matplotlib.pyplot plt  x =[1,2,3,10] y =[0.12,0.59,-0.89,0.45]  plt.plot(x, y, 'o-') plt.show() 

enter image description here


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -