From: W. Trevor King Date: Fri, 14 Jun 2013 11:11:04 +0000 (-0400) Subject: figures/stepper/step-size.asy: Restore piezo-approach labeling X-Git-Tag: v1.0~75 X-Git-Url: http://git.tremily.us/?p=thesis.git;a=commitdiff_plain;h=69d6fe005f8479666f832007bb7d1ed0ee4cb21b figures/stepper/step-size.asy: Restore piezo-approach labeling I'd had this in the old MetaPost version, but now the positions are automatic :). --- diff --git a/src/figures/stepper/step-size.asy b/src/figures/stepper/step-size.asy index 111a6ec..aa504c1 100644 --- a/src/figures/stepper/step-size.asy +++ b/src/figures/stepper/step-size.asy @@ -64,6 +64,14 @@ for (i = 0; i < deflection.length; ++i) { int magic_i = 6; /* pick one that looks pretty ;) */ real gain = 20; /* piezo volt per DAC volt */ real sens = 7.57; /* piezo sensitivity nm per piezo volt */ +Label[] labels = { + Label("a", align=E), + Label("b", align=E), + Label("c", align=SE), + Label("d", align=SE), + Label("e", align=SE), + Label("f", align=SE), + }; int j, k, start = -1; for (i = magic_i; i < calibration.length; ++i) { for (j = 0; j < calibration[i].piezo_approach.length; ++j) { @@ -73,13 +81,14 @@ for (i = magic_i; i < calibration.length; ++i) { start = 0; } piezo_approach_t p0 = piezoApproach(calibration, i, start); - for (k = start; k < start + 6; ++k) { + for (k = start; k < start + labels.length; ++k) { if (k < calibration[i].piezo_approach.length) { piezo_approach_t p = piezoApproach(calibration, i, k); real[] x = piezo[p.start:p.stop] - piezo[p0.start]; x = x * gain * sens; real[] y = deflection[p.start:p.stop] - deflection[p0.start]; graphData(x=x, y=y, mpath=mcross, dots=true); + label(labels[k - start], (x[x.length-1], y[y.length-1])); } } break; /* done with this stepper approach */