}
real[] k = {0.001, 0.01, 0.05, 0.1, 0.5, 1, 10};
+pen[] p = {blue, green, red, cyan, magenta, yellow, black};
+
int i;
for (i=k.length-1; i>=0; --i) {/* count down so legend and plot orders match */
string file = format("k-%f", k[i])+"."+"dat";
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);
+ df=300e-12*i, p=p[i], t=label);
}
xlimits(0, 300e-9*xscale, crop=true);