diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /noao/onedspec/splot/fudgept.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'noao/onedspec/splot/fudgept.x')
-rw-r--r-- | noao/onedspec/splot/fudgept.x | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/noao/onedspec/splot/fudgept.x b/noao/onedspec/splot/fudgept.x new file mode 100644 index 00000000..c2aa3740 --- /dev/null +++ b/noao/onedspec/splot/fudgept.x @@ -0,0 +1,38 @@ +# FUDGEPT -- Fudge a point + +procedure fudgept (sh, gfd, x, y, n, wx, wy) + +pointer sh +int gfd +real x[n] +real y[n] +int n +real wx, wy + +int i1, nplot, istart +double shdr_wl() + +begin + # Get pixel number + i1 = max (1, min (n, nint (shdr_wl (sh, double(wx))))) + + # Replace with Y-value + if (i1 > 0 && i1 <= n) + y[i1] = wy + else + return + + # Plot region around new point + if (i1 > 1 && i1 < n) { + nplot = 3 + istart = i1 - 1 + } else if (i1 == 1) { + nplot = 2 + istart = i1 + } else if (i1 == n) { + nplot = 2 + istart = n - 1 + } + + call gpline (gfd, x[istart], y[istart], nplot) +end |