+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')
+++ /dev/null
-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)
-Average unfolding force\t2.81498e-10
-Standard deviation \t2.60081e-11
+Average unfolding force 2.81498e-10
+Standard deviation 2.60081e-11
--- /dev/null
+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);
\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