Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. file = open('second.txt', 'r')
  3. x = {'USD': [], 'EURO': [], 'POUND': [], 'AUD': []}
  4. y = {'USD': [], 'EURO': [], 'POUND': [], 'AUD': []}
  5.  
  6.  
  7. for line in file:
  8. l = line.split()
  9. y[l[0]].append(float(l[2]))
  10. x[l[0]].append(len(y[l[0]]))
  11. file.close()
  12. plt.plot(x['USD'], y['USD'], x['EURO'], y['EURO'], x['POUND'], y['POUND'], x['AUD'], y['AUD'])
  13. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement