Changeset 7391 for trunk/Ohana/src/opihi/cmd.astro/cplot.c
- Timestamp:
- Jun 7, 2006, 7:15:49 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.astro/cplot.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.astro/cplot.c
r7080 r7391 3 3 int cplot (int argc, char **argv) { 4 4 5 int i, Npts ;5 int i, Npts, status; 6 6 float *x, *y, *r, *d, Rmin, Rmax; 7 7 Vector Xvec, Yvec, *xvec, *yvec; … … 39 39 y = Yvec.elements; 40 40 41 for (i = 0; i < Xvec.Nelements; i++, r++, d++, x++, y++) { 41 Npts = 0; 42 for (i = 0; i < Xvec.Nelements; i++, r++, d++) { 42 43 while (*r < Rmin) *r += 360.0; 43 44 while (*r > Rmax) *r -= 360.0; 44 fRD_to_XY (x, y, *r, *d, &graphmode.coords); 45 status = fRD_to_XY (x, y, *r, *d, &graphmode.coords); 46 if (!status) { 47 if (graphmode.ptype == 100) { 48 if (i % 2) { 49 // for odd points, skip previous also 50 x--; 51 y--; 52 Npts--; 53 } else { 54 // for even points, skip previous also 55 i++; 56 r++; 57 d++; 58 } 59 } 60 continue; 61 } 62 x++; 63 y++; 64 Npts++; 45 65 } 46 47 Npts = Xvec.Nelements; 66 Xvec.Nelements = Npts; 67 48 68 graphmode.etype = 0; 49 69 PrepPlotting (Npts, &graphmode);
Note:
See TracChangeset
for help on using the changeset viewer.
