Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import matplotlib.pylab as plt
  2. import csv
  3.  
  4. x = []
  5. y = []
  6. with open('C:/Users/dell/Desktop/D39_p5_1_10V.txt', 'r') as f:
  7. reader = csv.reader(f, delimiter='t')
  8. for row in reader:
  9. x.append(row[0])
  10. y.append(row[1])
  11.  
  12. plt.plot(x, y)
  13. plt.xlabel('Wavelength (nm)')
  14. plt.ylabel('Intensity (a.u)')
  15. plt.title('D39_p5_1_10V')
  16. plt.show()
  17. plt.savefig('D39_p5_1_10V.png')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement