Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. from matplotlib import pyplot as plt
  2. import os
  3.  
  4.  
  5. for _,_,filenames in os.walk('./finalexp/finalexp_tarik_v2'):
  6.  
  7. files = [f.replace(".wav", "").split("__") for f in filenames if f.endswith('.wav') and f != 'stitched.wav']
  8. files = sorted(files, key = lambda x: int(x[0]))
  9. x,y = zip(*files)
  10. x = [int(i) for i in x]
  11. y = [float(i) for i in y]
  12. # plt.plot(x,y)
  13.  
  14. for _,_,filenames in os.walk('./finalexp/finalexp_tarik_v3'):
  15.  
  16. files = [f.replace(".wav", "").split("__") for f in filenames if f.endswith('.wav') and f != 'stitched.wav']
  17. files = sorted(files, key = lambda x: int(x[0]))
  18. x2,y2 = zip(*files)
  19. x2 = [int(i) + 9 for i in x2]
  20. y2 = [float(i) for i in y2]
  21.  
  22. plt.figure(figsize=(10,6))
  23. plt.plot(x,y)
  24. plt.plot(x2,y2)
  25. plt.tight_layout()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement