From 69d6fe005f8479666f832007bb7d1ed0ee4cb21b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 14 Jun 2013 07:11:04 -0400 Subject: [PATCH] figures/stepper/step-size.asy: Restore piezo-approach labeling I'd had this in the old MetaPost version, but now the positions are automatic :). --- src/figures/stepper/step-size.asy | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 */ -- 2.26.2