import numpy as np
from matplotlib import pyplot as plt
import matplotlib as mpl

mpl.rcParams.update({'font.size':18})

deutden = np.genfromtxt('fdeutden.dat')
deutden2 = np.genfromtxt('../../run2/fdeutden.dat')
deutden3 = np.genfromtxt('../run2/fdeutden.dat')


plt.semilogy(deutden[:,0]/1e-12,deutden[:,1],'g',lw=2.0,label = r'5 $\times$ 10$^{28}$ m$^{-3}$')
plt.semilogy(deutden2[:,0]/1e-12,deutden2[:,1],'r',lw=2.0,label = r'2.5 $\times$ 10$^{28}$ m$^{-3}$')
plt.semilogy(deutden3[:,0]/1e-12,deutden3[:,1],'b',lw=2.0,label = r'1 $\times$ 10$^{28}$ m$^{-3}$')
plt.xlabel(r'$t$ (ps)')
plt.ylabel(r'$n_{D,f}$')
plt.grid()
plt.legend(loc = 'upper left')
plt.show()

plt.plot(deutden[:,0]/1e-12,deutden[:,1]/deutden2[:,1],'k',lw=2.0)
plt.xlabel(r'$t$ (ps)')
plt.ylabel(r'Ratio')
plt.grid()
plt.show()
