 
import numpy as np

import matplotlib.pyplot as plt
                    
                    
import os

files = os.listdir('.')


for f in files:
    
    if 'dat' in f:
        
        print 'Plotting data from', f        
        data = np.genfromtxt(f)     
        plt.plot(data, label = f[:-4])
        
plt.legend()
plt.show()
