In [1]:
#Plots Rényi Entropy as a function of the effective interaction g
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
In [2]:
#Load Data Files
dataTh = np.loadtxt('S2_n1_N13_Th.dat')
dataED = np.loadtxt('NP26F13n1u_3_3.dat')
gED=dataED[:,0]
SED=dataED[:,3]
for i in range(len(gED)):
k= np.pi/np.arccos(-gED[i]/2)/2
gED[i]=(k+1/k)/4-1/2
gEDnV=gED[0:18]
gEDpV=gED[19:39]
SEDnV=SED[0:18]
SEDpV=SED[19:39]
gTh=dataTh[:,0]
STh2=dataTh[:,2]
STh7=dataTh[:,7]
STh8=dataTh[:,8]
STh10=dataTh[:,10]
In [3]:
plt.style.reload_library()
with plt.style.context('../IOP_large.mplstyle'):
#Create the figure
fig1 = plt.figure()
ax1 = fig1.add_subplot(111)
ax2 = fig1.add_subplot(111)
ax3 = fig1.add_subplot(111)
ax1.set_xlabel(r'$g$')
ax1.set_ylabel(r'$S_2(n=1)-{\rm{ln}}(N)$')
ax3 = ax1.twinx()
ax2.fill_between(gTh,STh2, STh10,facecolor='#4173b3',alpha=0.2,edgecolor="none")
#UV cutoffs = 2.5 (--),2.0 (-) & 1.7 (-.)
ax1.plot(gTh,STh2,'--', c="#4173b3",mew=1.0,fillstyle='none',label=r'$\Lambda/\rho_0=2.5$')
ax1.plot(gTh,STh7,'-', c="#4173b3",mew=1.0,fillstyle='none',label=r'$\Lambda/\rho_0=2.0$')
ax1.plot(gTh,STh10,'-.', c="#4173b3",mew=1.0,fillstyle='none',label=r'$\Lambda/\rho_0=1.7$')
#Repulsive (open circles) & Attractive (closed circles) potentials
ax3.plot(gEDpV,SEDpV,'o', mec="#e95c47",mew=1.0,fillstyle='none',label=r'$V/t>0$')
ax3.plot(gEDnV,SEDnV,'o', c="#e95c47", mec="#e95c47",mew=1.0,fillstyle='full',label=r'$V/t<0$')
#Set the axis limits
ax1.set_xlim(0,0.1)
ax1.set_ylim(0,0.1)
ax3.set_xlim(0,0.1)
ax3.set_ylim(0,0.1)
#Setup the legend
ax1.legend(loc=(0.60,0.04),frameon=False,numpoints=1,ncol=1,title="TLL",shadow=True,fancybox=True)
ax3.legend(loc=(0.01,0.55),frameon=False,numpoints=1,ncol=1,title="ED: $N=13$",shadow=True,fancybox=True)
ax3.axes.get_xaxis().set_visible(False)
ax3.tick_params(
axis='both', # changes apply to the x-axis
which='both', # both major and minor ticks are affected
right='on', # ticks along the bottom edge are off
top='on', # ticks along the top edge are off
labelright='off') # labels along the bottom edge are off
ax2.tick_params(
axis='both', # changes apply to the x-axis
which='both', # both major and minor ticks are affected
right='on',
top='on') # ticks along the top edge are off
#Save the figures
plt.savefig('interactionDependence.pdf')
plt.savefig('interactionDependence.png')
In [ ]: