Example #1
0
def plot_sw(ff, temps):
    figure()
    for temp in temps:
        fname = 'data/radial-sw-%.2f-%.2f-%.2f.dat' % (temp, 1.3, ff/100.0)
        data = loadtxt(fname)
        r = data[:,0]
        filling_fraction = data[:,1]
        plot(r, filling_fraction/(ff/100.0), color(temp)+'-',
             label = 'T = %.2f' %(temp))

        N = 500
        ww = 1.3
        g, r = readandcompute.g_r('data/mc/ww%.2f-ff%.2f-N%d' % (ww,ff/100.0,N), temp)
        plt.plot(r/2, g, color(temp)+':')

    title('Radial distribution function ff = %g' % (ff/100))
    xlabel(r'$r$')
    ylabel('$g(r)$')
    legend()
    xlim(-0.2, 4)
    #ylim(0, 4)

    outputname = 'figs/radial-sw-%02d.pdf' % (ff)
    savefig(outputname, bbox_inches=0)
    print('figs/radial-sw-%02d.pdf' % (ff))
Example #2
0
def plot_sw(ff, temps):
    figure()
    for temp in temps:
        fname = 'data/radial-sw-%.2f-%.2f-%.2f.dat' % (temp, 1.3, ff/100.0)
        data = loadtxt(fname)
        r = data[:,0]
        filling_fraction = data[:,1]
        plot(r, filling_fraction/(ff/100.0), color(temp)+'-',
             label = 'T = %.2f' %(temp))

        N = 500
        ww = 1.3
        g, r = readandcompute.g_r('data/mc/ww%.2f-ff%.2f-N%d' % (ww,ff/100.0,N), temp)
        plt.plot(r/2, g, color(temp)+':')

    title('Radial distribution function ff = %g' % (ff/100))
    xlabel(r'$r$')
    ylabel('$g(r)$')
    legend()
    xlim(-0.2, 4)
Example #3
0
matplotlib.rc('font', **{'family': 'serif', 'serif': ['Computer Modern']})
matplotlib.rc('text', usetex=True)

import readandcompute

ww = float(sys.argv[1])
#arg ww = [1.3]
ff = float(sys.argv[2])
#arg ff = [0.3]
Ns = eval(sys.argv[3])
#arg Ns = [[500, 1372, 400]]
T = float(sys.argv[4])
#arg T = [1.0]

plt.figure()

for N in Ns:
    g, r = readandcompute.g_r('data/mc/ww%.2f-ff%.2f-N%d' % (ww,ff,N), T)
    plt.plot(r/2, g, '-', label='$N=%d$' % N)

plt.legend(loc='best')
plt.xlabel(r'$r/\sigma$')
plt.ylabel(r'$g(r)$')
plt.title(r'$g(r)$ with $\lambda = %g$, $\eta=%g$, and $T/\epsilon = %g$'
          % (ww, ff, T))

plt.savefig('figs/radial-distribution-ww%.2f-ff%.2f-T%.2g.pdf' % (ww,ff,T))

plt.show()