IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 3, 2006, 7:25:12 AM (20 years ago)
Author:
eugene
Message:

fixed error in histogram for NaN/Inf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/kapa/graph/PSObjects.c

    r5852 r9845  
    259259  Y1 = layout[0].axis[1].fy + layout[0].axis[1].dfy;
    260260
     261  /* find the first valid datapoint */
    261262  x = object[0].x; y = object[0].y;
    262263  for (i = 0; (i < object[0].Npts) && !(finite(x[i]) && finite(y[i])); i++);
    263264  if (i >= object[0].Npts) return;
    264   sx0 = x[0]*mxi + y[0]*mxj + bx;
    265   sy0 = x[0]*myi + y[0]*myj + by;
     265  sx0 = x[i]*mxi + y[i]*mxj + bx;
     266  sy0 = x[i]*myi + y[i]*myj + by;
    266267  sx0 = MIN (MAX (sx0, X0), X1);
    267268  sy0 = MAX (MIN (sy0, Y0), Y1);
    268269 
     270  /* continue with rest of points */
    269271  for (i++; i < object[0].Npts; i++) {
    270272    if (!(finite(x[i]) && finite(y[i]))) continue;
Note: See TracChangeset for help on using the changeset viewer.