Converted sim-hist from Gnuplot to Asymptote.
authorW. Trevor King <wking@drexel.edu>
Sun, 2 May 2010 02:26:26 +0000 (22:26 -0400)
committerW. Trevor King <wking@drexel.edu>
Sun, 2 May 2010 02:26:26 +0000 (22:26 -0400)
tex/src/figures/sim-hist/SConscript
tex/src/figures/sim-hist/fig.gp [deleted file]
tex/src/figures/sim-hist/hist.dat [moved from tex/src/figures/sim-hist/hist.d with 100% similarity]
tex/src/figures/sim-hist/hist.note
tex/src/figures/sim-hist/sim-hist.asy [new file with mode: 0644]
tex/src/sawsim/discussion.tex

index d8ff28ff47809e2c16dd1a745edc9a1fed5f3997..0532a674b582a9179effec828af734308169d524 100644 (file)
@@ -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 (file)
index cc244d1..0000000
+++ /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)
index c5a9fdf09481929ea56e08c1fbb519c8eaeb5de1..8ef0f7a3b3647ddb9de2321fe9d4ded3eef3e46f 100644 (file)
@@ -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 (file)
index 0000000..0678559
--- /dev/null
@@ -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);
index 9f9123c54259bf67076ba36dd8e952e99e76e515..ec63d630a9f9c5043b57bd332bf0aa1832c6fc9a 100644 (file)
@@ -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