final=p_final_graph, axis=Right, palette=p);
}
+string math(string contents) {
+ return "$" + contents + "$";
+}
+
+string Exp(string value) {
+ return "\cdot 10^{" + value + "}";
+}
+
string units(string value, string units) {
- return "$"+value+"\mbox{ "+units+"}$";
+ return value+"\mbox{ "+units+"}";
}
pen phard=blue;
real yscale=1;
graphFile("loading-rate.d/loading_rate_131.98.dat", xscale, yscale, phard, m8,
- t=units("131.98","pN/nm"), dots=true);
+ t=math(units("131.98","pN/nm")), dots=true);
graphFile("loading-rate.d/loading_rate_24.33.dat", xscale, yscale, red, m8,
- t=units("24.33","pN/nm"), dots=true);
+ t=math(units("24.33","pN/nm")), dots=true);
xlimits(1,3e3);
ylimits(90,620);
real xscale=1;
real yscale=1e12;
-graphFile("i-dep.d/i_dep_127_8_1e-6", xscale, yscale, phard, m8, t=units("127","pN/nm")+", 8 domains");
-graphFile("i-dep.d/i_dep_27_8_1e-6", xscale, yscale, pmed, m8, t=units("27","pN/nm")+", 8 domains");
-graphFile("i-dep.d/i_dep_127_30_1e-6", xscale, yscale, phard, m30, t=units("127","pN/nm")+", 30 domains");
-graphFile("i-dep.d/i_dep_27_30_1e-6", xscale, yscale, pmed, m30, t=units("27","pN/nm")+", 30 domains");
-graphFile("i-dep.d/i_dep_0.1_1_1e-6", xscale, yscale, psoft, m1, t=units("0.1","pN/nm")+", 1 domain");
-graphFile("i-dep.d/i_dep_0.1_30_1e-6", xscale, yscale, psoft, m30, t=units("0.1","pN/nm")+", 30 domains");
+graphFile("i-dep.d/i_dep_127_8_1e-6", xscale, yscale, phard, m8,
+ t=math(units("127","pN/nm"))+", 8 domains");
+graphFile("i-dep.d/i_dep_27_8_1e-6", xscale, yscale, pmed, m8,
+ t=math(units("27","pN/nm"))+", 8 domains");
+graphFile("i-dep.d/i_dep_127_30_1e-6", xscale, yscale, phard, m30,
+ t=math(units("127","pN/nm"))+", 30 domains");
+graphFile("i-dep.d/i_dep_27_30_1e-6", xscale, yscale, pmed, m30,
+ t=math(units("27","pN/nm"))+", 30 domains");
+graphFile("i-dep.d/i_dep_0.1_1_1e-6", xscale, yscale, psoft, m1,
+ t=math(units("0.1","pN/nm"))+", 1 domain");
+graphFile("i-dep.d/i_dep_0.1_30_1e-6", xscale, yscale, psoft, m30,
+ t=math(units("0.1","pN/nm"))+", 30 domains");
-//xlimits(1,10);
-ylimits(140,320);
+ylimits(140, 320);
-label(sLabel("Peak index dependence ("+units("1.0","$\mu$m/s")+")"), point(N),N);
-xaxis(sLabel("Peak index"),BottomTop,LeftTicks);
-yaxis(sLabel("Unfolding force (pN)"),LeftRight,RightTicks);
+label(sLabel("Peak index dependence ($"+units("1.0","$\mu$m/s")+"$)"),
+ point(N), N);
+xaxis(sLabel("Peak index"), BottomTop, LeftTicks);
+yaxis(sLabel("Unfolding force (pN)"), LeftRight, RightTicks);
-add(legend(),point(E),20E,UnFill);
+add(legend(), point(E), 20E, UnFill);
graphFile(file="loading-rate.d/loading_rate_dep_127_8",
xscale=xscale, yscale=yscale, p=phard, mpath=mdot,
- t=units("127","pN/nm"), dots=true);
+ t=math(units("127","pN/nm")), dots=true);
graphFile(file="loading-rate.d/loading_rate_dep_27_8",
xscale=xscale, yscale=yscale, p=red, mpath=mdot,
- t=units("27","pN/nm"), dots=true);
+ t=math(units("27","pN/nm")), dots=true);
xlimits(20,7e5);
ylimits(40,400);
}
graphFile("v-dep.d/v_dep_127_8", vscale, fscale, p=phard, mpath=m8,
- t=units("127","pN/nm")+", 8 domains", dots=true);
+ t=math(units("127","pN/nm"))+", 8 domains", dots=true);
graphFile("v-dep.d/v_dep_27_8", vscale, fscale, p=pmed, mpath=m8,
- t=units("27","pN/nm")+", 8 domains", dots=true);
+ t=math(units("27","pN/nm"))+", 8 domains", dots=true);
graphFile("v-dep.d/v_dep_127_30", vscale, fscale, p=phard, mpath=m30,
- t=units("127","pN/nm")+", 30 domains", dots=true);
+ t=math(units("127","pN/nm"))+", 30 domains", dots=true);
graphFile("v-dep.d/v_dep_27_30", vscale, fscale, p=pmed, mpath=m30,
- t=units("27","pN/nm")+", 30 domains", dots=true);
+ t=math(units("27","pN/nm"))+", 30 domains", dots=true);
graphFile("v-dep.d/v_dep_0.1_1", vscale, fscale, p=psoft, mpath=m1,
- t=units("0.1","pN/nm")+", 1 domain", dots=true);
+ t=math(units("0.1","pN/nm"))+", 1 domain", dots=true);
graphFile("v-dep.d/v_dep_0.1_30", vscale, fscale, p=psoft, mpath=m30,
- t=units("0.1","pN/nm")+", 30 domains", dots=true);
+ t=math(units("0.1","pN/nm"))+", 30 domains", dots=true);
fitFile("v-dep.d/v_dep_127_8.fit.dat", f=fn_logxliny,
xmin=1e-9, xmax=1e-5, xscale=vscale, yscale=fscale, p=phard);
fitFile("v-dep.d/v_dep_27_8.fit.dat", f=fn_logxliny,
string file = format("k-%f", k[i])+"."+"dat";
/* We break up .dat so the Asymptote scanner doesn't pick up
* .dat as a dependency (which obviously doesn't exist). */
- string label = format("$k=%f\mbox{ pN/nm}$", k[i]*1e3);
+ string label = math("k="+units(format("%f",k[i]*1e3), "pN/nm"));
if (k[i] >= 1)
- label = format("$k=%f\mbox{ nN/nm}$", k[i]);
+ label = math("k="+units(format("%f",k[i]),"nN/nm"));
// TODO: rainbow pen(N, i)
graphSawtooth(file=file, k=k[i], xscale=xscale, fscale=fscale,
df=300e-12*i, p=psoft, t=label);
return params[0] * log10(x) + params[1];
}
+string kx_title(string kval, string kexp, string xval) {
+ return math("k_{u0}=" + units("5"+Exp("-5"),"s$^{-1}$"))
+ +", " + math("\Delta x_u=" + units(xval,"nm"));
+}
+
graphFile(pic, "v_dep-5e-5_0.1e-9/v_dep", ycol=2,
xscale=xscale, yscale=yscale, p=psoft,
- t="$k_{u0}=5\cdot10^{-5}\mbox{ s$^{-1}$}$, $\Delta x_u=0.100\mbox{ nm}$",
- dots=true);
+ t=kx_title(kval="5", kexp="-5", xval="0.100"), dots=true);
graphFile(pic, "v_dep-1e-5_0.225e-9/v_dep", ycol=2,
xscale=xscale, yscale=yscale, p=pmed,
- t="$k_{u0}=1\cdot10^{-5}\mbox{ s$^{-1}$}$, $\Delta x_u=0.225\mbox{ nm}$",
- dots=true);
+ t=kx_title(kval="1", kexp="-5", xval="0.225"), dots=true);
graphFile(pic, "v_dep-5e-5_0.225e-9/v_dep", ycol=2,
xscale=xscale, yscale=yscale, p=phard,
- t="$k_{u0}=5\cdot10^{-5}\mbox{ s$^{-1}$}$, $\Delta x_u=0.225\mbox{ nm}$",
- dots=true);
+ t=kx_title(kval="5", kexp="-5", xval="0.225"), dots=true);
fitFile(pic, "v_dep-5e-5_0.1e-9/v_dep-sd.fit.dat", f=fn_logxliny,
xmin=1e-9, xmax=1e-5, xscale=xscale, yscale=yscale, p=psoft);
fitFile(pic, "v_dep-1e-5_0.225e-9/v_dep-sd.fit.dat", f=fn_logxliny,
return params[0] * log10(x) + params[1];
}
+string kx_title(string kval, string kexp, string xval) {
+ return math("k_{u0}=" + units("5"+Exp("-5"),"s$^{-1}$"))
+ +", " + math("\Delta x_u=" + units(xval,"nm"));
+}
+
+
graphFile("v_dep-5e-5_0.1e-9/v_dep", xscale=xscale, yscale=yscale, p=psoft,
- t="$k_{u0}=5\cdot10^{-5}\mbox{ s$^{-1}$}$, $\Delta x_u=0.100\mbox{ nm}$",
- dots=true);
+ t=kx_title(kval="5", kexp="-5", xval="0.100"), dots=true);
graphFile("v_dep-1e-5_0.225e-9/v_dep", xscale=xscale, yscale=yscale, p=pmed,
- t="$k_{u0}=1\cdot10^{-5}\mbox{ s$^{-1}$}$, $\Delta x_u=0.225\mbox{ nm}$",
- dots=true);
+ t=kx_title(kval="1", kexp="-5", xval="0.225"), dots=true);
graphFile("v_dep-5e-5_0.225e-9/v_dep", xscale=xscale, yscale=yscale, p=phard,
- t="$k_{u0}=5\cdot10^{-5}\mbox{ s$^{-1}$}$, $\Delta x_u=0.225\mbox{ nm}$",
- dots=true);
+ t=kx_title(kval="5", kexp="-5", xval="0.225"), dots=true);
fitFile("v_dep-5e-5_0.1e-9/v_dep.fit.dat", f=fn_logxliny,
xmin=1e-9, xmax=1e-5, xscale=xscale, yscale=yscale, p=psoft);
fitFile("v_dep-1e-5_0.225e-9/v_dep.fit.dat", f=fn_logxliny,