From: W. Trevor King Date: Sun, 2 May 2010 02:26:26 +0000 (-0400) Subject: Converted sim-hist from Gnuplot to Asymptote. X-Git-Tag: v1.0~378 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=50f87c10b6ea7e9047b7a4d16a7abe1adf4a7d65;p=thesis.git Converted sim-hist from Gnuplot to Asymptote. --- diff --git a/tex/src/figures/sim-hist/SConscript b/tex/src/figures/sim-hist/SConscript index d8ff28f..0532a67 100644 --- a/tex/src/figures/sim-hist/SConscript +++ b/tex/src/figures/sim-hist/SConscript @@ -1,8 +1,23 @@ +from site_cons.site_init import link_wtk_graph + + +FIGURES = ['sim-hist'] + # Get the passed in environment. Import('env') -for gp in Glob('*.gp'): - env.Gnuplot(gp) +# TODO, autogen hist.hist and hist.note from hist.dat + +wtk_graph = link_wtk_graph(env) + +for fig in FIGURES: + asyfile = '%s.asy' % fig # static .asy file + pyfig = fig.replace('-', '_') + data = '%s_data' % (pyfig) + asydata = [] + if data in globals(): # generated data dependencies + asydata = globals()[data] + env.Asymptote([asyfile, wtk_graph] + asydata) # Pass back the modified environment. Return('env') diff --git a/tex/src/figures/sim-hist/fig.gp b/tex/src/figures/sim-hist/fig.gp deleted file mode 100644 index cc244d1..0000000 --- a/tex/src/figures/sim-hist/fig.gp +++ /dev/null @@ -1,20 +0,0 @@ -set terminal pdf enhanced font 'Times,7' size 9cm, 6cm -#set terminal pdf monochrome enhanced font 'Times,7' size 9cm, 6cm -set output 'fig.pdf' -unset key -set xrange [100:400] -#set yrange [0.0001:1] -set logscale y -set xtics nomirror -set ytics nomirror -set ytics format "10^{%L}" -# border 3 = bottom & left -set border 3 -set xlabel 'Force (pN)' -set ylabel 'Frequency' - -set boxwidth 20 -set style data boxes -set style fill solid 0.3 -#set style fill pattern 4 -plot 'hist.hist' using ($1*1e12+10):($2/3200) diff --git a/tex/src/figures/sim-hist/hist.d b/tex/src/figures/sim-hist/hist.dat similarity index 100% rename from tex/src/figures/sim-hist/hist.d rename to tex/src/figures/sim-hist/hist.dat diff --git a/tex/src/figures/sim-hist/hist.note b/tex/src/figures/sim-hist/hist.note index c5a9fdf..8ef0f7a 100644 --- a/tex/src/figures/sim-hist/hist.note +++ b/tex/src/figures/sim-hist/hist.note @@ -1,2 +1,2 @@ -Average unfolding force\t2.81498e-10 -Standard deviation \t2.60081e-11 +Average unfolding force 2.81498e-10 +Standard deviation 2.60081e-11 diff --git a/tex/src/figures/sim-hist/sim-hist.asy b/tex/src/figures/sim-hist/sim-hist.asy new file mode 100644 index 0000000..0678559 --- /dev/null +++ b/tex/src/figures/sim-hist/sim-hist.asy @@ -0,0 +1,18 @@ +import wtk_graph; + + +size(15cm, 10cm, IgnoreAspect); + +scale(Linear, Log); +real fscale=1e12; + +pen p = psoft; + +histFile("hist.hist", bin_scale=fscale, fillpen=(p+opacity(0.3)), drawpen=p); + +//set xrange [100:400] +//#set yrange [0.0001:1] +//xlimits(pic, xmin, xmax); +//ylimits(pic, ymin, ymax); +xaxis(sLabel("Force (pN)"), BottomTop, LeftTicks, above=true); +yaxis(sLabel("Frequency"), LeftRight, RightTicks, above=true); diff --git a/tex/src/sawsim/discussion.tex b/tex/src/sawsim/discussion.tex index 9f9123c..ec63d63 100644 --- a/tex/src/sawsim/discussion.tex +++ b/tex/src/sawsim/discussion.tex @@ -26,7 +26,8 @@ deviation of $25\U{pN}$. \subfloat[][]{\asyfig{figures/sim-sawtooth/sim-sawtooth}% \label{fig:sawsim:sim-sawtooth}% }\\ -\subfloat[][]{\includegraphics{figures/sim-hist/fig}\label{fig:sawsim:sim-hist}% +\subfloat[][]{\asyfig{figures/sim-hist/sim-hist}% + \label{fig:sawsim:sim-hist}% } \caption{(a) Three simulated force curves from pulling a polymer of eight identical protein molecules. The simulation was carried out