import numpy as np import matplotlib.pyplot as plt fine = np.loadtxt('profile_019_fine.txt') rough = np.loadtxt('profile_019_rough.txt') plt.step(fine[:,0],fine[:,1],label='fine') plt.step(rough[:,0],rough[:,1],label='rough') #plt.xlabel('Iteration') #plt.ylabel('RMS emittance (mm mrad)') plt.legend() plt.show()