In [1]:
# Start matplotlib
from matplotlib import rc
rc('text', usetex=True)
plt.rcParams['text.latex.preamble'] = [
r'\usepackage{bm}', # for bold math
r'\usepackage{siunitx}', # i need upright \micro symbols, but you need...
r'\sisetup{detect-all}', # ...this to force siunitx to actually use your fonts
#r'\usepackage[textlf]{MyriadPro}',
#r'\usepackage{sansmath}', # load up the sansmath so that math -> helvet
#r'\sansmath', # <- tricky! -- gotta actually tell tex to use!
]
plt.rcParams['axes.linewidth'] = 0.6
plt.rcParams['patch.linewidth'] = 0.4
figure = plt.figure(figsize=(4,3.2))
gs = matplotlib.gridspec.GridSpec( 1,1)
figure.suptitle('')
ax = plt.subplot( gs[0,0] )
ax.set_ylim(-0.1, 2.1)
ax.set_xlim(-2., 2.5)
c=['red','green','blue','black']
U = 1.
Temperature = [0.10,0.2,0.4, 0.8]
for i,T in enumerate(Temperature):
beta = 1 / T
mu = np.linspace(-3.5,3.5,340)
nocc = 2*( np.exp(beta*mu) + np.exp( -beta*U+ 2*beta*mu)) / \
(1+2*np.exp(beta*mu) + np.exp( -beta*U+ 2*beta*mu) )
ax.plot( mu, nocc, '-', c=c[i], lw=1.0, label='$T/U=%.2f$'%T)
ax.grid(alpha=0.3)
ax.set_xlabel('$\mu/U$')
ax.set_ylabel(r'$\langle n \rangle$', rotation=0, labelpad=15)
ax.xaxis.set_major_locator( matplotlib.ticker.MultipleLocator(1.0))
ax.xaxis.set_minor_locator( matplotlib.ticker.MultipleLocator(0.5))
ax.legend(loc='best',numpoints=1,\
prop={'size':10}, \
handlelength=1.1,handletextpad=0.5)
gs.tight_layout(figure, rect=[0,0.0,1.0,0.96])
outfile = 'hubbard_0t_occupation.png'
figure.savefig(outfile, dpi=250)
In [2]:
# Start matplotlib
from matplotlib import rc
rc('text', usetex=True)
plt.rcParams['text.latex.preamble'] = [
r'\usepackage{bm}', # for bold math
r'\usepackage{siunitx}', # i need upright \micro symbols, but you need...
r'\sisetup{detect-all}', # ...this to force siunitx to actually use your fonts
#r'\usepackage[textlf]{MyriadPro}',
#r'\usepackage{sansmath}', # load up the sansmath so that math -> helvet
#r'\sansmath', # <- tricky! -- gotta actually tell tex to use!
]
plt.rcParams['axes.linewidth'] = 0.6
plt.rcParams['patch.linewidth'] = 0.4
figure = plt.figure(figsize=(4,3.2))
gs = matplotlib.gridspec.GridSpec( 1,1)
figure.suptitle('')
ax = plt.subplot( gs[0,0] )
ax.set_ylim(-0.1, 2.1)
ax.set_xlim(-2., 2.5)
c=['red','green','blue','black']
U = 1.
Temperature = [0.10,0.2,0.4, 0.8]
for i,T in enumerate(Temperature):
beta = 1 / T
mu = np.linspace(-3.5,3.5,340)
ener = U * np.exp(2.*beta*mu - beta*U) / (1 + 2.*np.exp(beta*mu) + np.exp(2*beta*mu-beta*U))
ax.plot( mu, ener, '-', c=c[i], lw=1.0, label='$T/U=%.2f$'%T)
ax.grid(alpha=0.3)
ax.set_xlabel('$\mu/U$')
ax.set_ylabel(r'$\langle E \rangle$', rotation=0, labelpad=15)
ax.xaxis.set_major_locator( matplotlib.ticker.MultipleLocator(1.0))
ax.xaxis.set_minor_locator( matplotlib.ticker.MultipleLocator(0.5))
ax.legend(loc='best',numpoints=1,\
prop={'size':10}, \
handlelength=1.1,handletextpad=0.5)
gs.tight_layout(figure, rect=[0,0.0,1.0,0.96])
outfile = 'hubbard_0t_energy.png'
figure.savefig(outfile, dpi=250)
In [3]:
# Start matplotlib
from matplotlib import rc
rc('text', usetex=True)
plt.rcParams['text.latex.preamble'] = [
r'\usepackage{bm}', # for bold math
r'\usepackage{siunitx}', # i need upright \micro symbols, but you need...
r'\sisetup{detect-all}', # ...this to force siunitx to actually use your fonts
#r'\usepackage[textlf]{MyriadPro}',
#r'\usepackage{sansmath}', # load up the sansmath so that math -> helvet
#r'\sansmath', # <- tricky! -- gotta actually tell tex to use!
]
plt.rcParams['axes.linewidth'] = 0.6
plt.rcParams['patch.linewidth'] = 0.4
figure = plt.figure(figsize=(4,3.2))
gs = matplotlib.gridspec.GridSpec( 1,1)
figure.suptitle('')
ax = plt.subplot( gs[0,0] )
ax.set_ylim(-0.1, 2.1)
ax.set_xlim(-2., 2.5)
c=['red','green','blue','black']
U = 1.
Temperature = [0.10,0.2,0.4, 0.8]
for i,T in enumerate(Temperature):
beta = 1 / T
mu = np.linspace(-3.5,3.5,340)
mom = 2*( np.exp(beta*mu)) / \
(1+2*np.exp(beta*mu) + np.exp( -beta*U+ 2*beta*mu) )
ax.plot( mu, mom, '-', c=c[i], lw=1.0, label='$T/U=%.2f$'%T)
ax.grid(alpha=0.3)
ax.set_xlabel('$\mu/U$')
ax.set_ylabel(r'$\langle m^{2} \rangle$', rotation=0, labelpad=15)
ax.xaxis.set_major_locator( matplotlib.ticker.MultipleLocator(1.0))
ax.xaxis.set_minor_locator( matplotlib.ticker.MultipleLocator(0.5))
ax.legend(loc='best',numpoints=1,\
prop={'size':10}, \
handlelength=1.1,handletextpad=0.5)
gs.tight_layout(figure, rect=[0,0.0,1.0,0.96])
outfile = 'hubbard_0t_moments.png'
figure.savefig(outfile, dpi=250)
In [ ]: