Advertisement
erbilsilik

Untitled

Oct 11th, 2016
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. """
  3. Created on Wed Oct 5 12:17:49 2016
  4.  
  5. @author: Erbil ŞİLİk
  6. """
  7.  
  8. # -*- coding: utf-8 -*-
  9.  
  10. from glob import glob
  11. import numpy as np
  12. import matplotlib.pyplot as plt
  13. import matplotlib as mpl
  14.  
  15. # loop over all files in the current directory ending with .txt
  16. for fname in glob("./*.txt"):
  17. # read file, skip header (1 line) and unpack into 3 variables
  18. POS, ESD = np.genfromtxt(fname, unpack=True)
  19.  
  20. plt.tick_params(
  21. axis='both', which='both',
  22. right='off', left='off',
  23. top = 'off', bottom = 'off',
  24. labelleft='off')
  25.  
  26. plt.plot(POS, ESD, color='blue')
  27. plt.xlabel('2${\Theta}$ (degree)')
  28. plt.ylabel('Intensity (a.u)')
  29. mpl.rcParams.update({'font.size': 12})
  30. #plt.legend(loc='lower center')
  31. # plt.title('')
  32. plt.show()
  33. #plt.savefig(fname + 't.tif', dpi=600)
  34. plt.clf()
  35.  
  36. # x -> 2theta (degree)
  37. # y- > Intensity (a.u)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement