[BACK]Return to plot2d.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot

Diff for /OpenXM_contrib/gnuplot/Attic/plot2d.c between version 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2000/01/09 17:00:54 version 1.1.1.2, 2000/01/22 14:15:59
Line 288  struct curve_points *this_plot;
Line 288  struct curve_points *this_plot;
  * it will later be moved passed title/with/linetype/pointtype   * it will later be moved passed title/with/linetype/pointtype
  */   */
 {  {
     register int i /* num. points ! */ , j, col;      int i /* num. points ! */ , j;
       int max_cols, min_cols;     /* allowed range of column numbers */
     double v[NCOL];      double v[NCOL];
     int storetoken = this_plot->token;      int storetoken = this_plot->token;
   
Line 297  struct curve_points *this_plot;
Line 298  struct curve_points *this_plot;
     switch (this_plot->plot_style) {    /* set maximum columns to scan */      switch (this_plot->plot_style) {    /* set maximum columns to scan */
     case XYERRORBARS:      case XYERRORBARS:
     case BOXXYERROR:      case BOXXYERROR:
         col = 7;          max_cols = 7;
           min_cols = 4;
         break;          break;
   
     case BOXERROR:  
     case FINANCEBARS:      case FINANCEBARS:
     case CANDLESTICKS:      case CANDLESTICKS:
         col = 5;          min_cols = max_cols = 5;
         break;          break;
   
       case BOXERROR:
           max_cols = 5;
           min_cols = 4;
           break;
   
       case VECTOR:
           min_cols = max_cols = 4;
           break;
   
     case XERRORBARS:      case XERRORBARS:
     case YERRORBARS:      case YERRORBARS:
     case VECTOR:          max_cols = 4;
         col = 4;          min_cols = 3;
         break;          break;
   
     case BOXES:      case BOXES:
         col = 4;          min_cols = 2;
         break;          max_cols = 4;
   
     default:      default:
         col = 2;          min_cols = 1;
           max_cols = 2;
     }      }
   
     if (this_plot->plot_smooth == ACSPLINES)      if (this_plot->plot_smooth == ACSPLINES)
         col = 3;          max_cols = 3;
   
     if (df_no_use_specs > col)      if (df_no_use_specs > max_cols)
         fputs("warning : too many using specs for this style\n", stderr);          int_error("Too many using specs for this style", NO_CARET);
   
       if (df_no_use_specs >0 && df_no_use_specs < min_cols)
           int_error("Not enough columns for this style", NO_CARET);
   
     i = 0;      i = 0;
     while ((j = df_readline(v, col)) != DF_EOF) {      while ((j = df_readline(v, max_cols)) != DF_EOF) {
         /* j <= col */          /* j <= max_cols */
   
         if (i >= this_plot->p_max) {          if (i >= this_plot->p_max) {
             /*              /*
Line 1194  do{ assert(!polar && !parametric); \
Line 1208  do{ assert(!polar && !parametric); \
     if (plot_num == 0 || first_plot == NULL) {      if (plot_num == 0 || first_plot == NULL) {
         int_error("no functions or data to plot", c_token);          int_error("no functions or data to plot", c_token);
     }      }
   
   
     if (uses_axis[FIRST_X_AXIS]) {      if (uses_axis[FIRST_X_AXIS]) {
         if (max_array[FIRST_X_AXIS] == -VERYLARGE ||          if (max_array[FIRST_X_AXIS] == -VERYLARGE ||
             min_array[FIRST_X_AXIS] == VERYLARGE)              min_array[FIRST_X_AXIS] == VERYLARGE)
Line 1211  do{ assert(!polar && !parametric); \
Line 1227  do{ assert(!polar && !parametric); \
             min_array[SECOND_X_AXIS] = min_array[FIRST_X_AXIS];              min_array[SECOND_X_AXIS] = min_array[FIRST_X_AXIS];
         if (auto_array[SECOND_X_AXIS] & 2)          if (auto_array[SECOND_X_AXIS] & 2)
             max_array[SECOND_X_AXIS] = max_array[FIRST_X_AXIS];              max_array[SECOND_X_AXIS] = max_array[FIRST_X_AXIS];
           if (! auto_array[SECOND_X_AXIS])
               FIXUP_RANGE_FOR_LOG(SECOND_X_AXIS, x2);
     }      }
   
     if (!uses_axis[FIRST_X_AXIS]) {      if (!uses_axis[FIRST_X_AXIS]) {
         assert(uses_axis[SECOND_X_AXIS]);          assert(uses_axis[SECOND_X_AXIS]);
         if (auto_array[FIRST_X_AXIS] & 1)          if (auto_array[FIRST_X_AXIS] & 1)
Line 1220  do{ assert(!polar && !parametric); \
Line 1237  do{ assert(!polar && !parametric); \
         if (auto_array[FIRST_X_AXIS] & 2)          if (auto_array[FIRST_X_AXIS] & 2)
             max_array[FIRST_X_AXIS] = max_array[SECOND_X_AXIS];              max_array[FIRST_X_AXIS] = max_array[SECOND_X_AXIS];
     }      }
   
   
     if (uses_axis[FIRST_Y_AXIS]) {      if (uses_axis[FIRST_Y_AXIS]) {
         if (max_array[FIRST_Y_AXIS] == -VERYLARGE ||          if (max_array[FIRST_Y_AXIS] == -VERYLARGE ||
             min_array[FIRST_Y_AXIS] == VERYLARGE)              min_array[FIRST_Y_AXIS] == VERYLARGE)
             int_error("all points undefined!", NO_CARET);              int_error("all points undefined!", NO_CARET);
         fixup_range(FIRST_Y_AXIS, "y");          fixup_range(FIRST_Y_AXIS, "y");
         FIXUP_RANGE_FOR_LOG(FIRST_Y_AXIS, y);          FIXUP_RANGE_FOR_LOG(FIRST_Y_AXIS, y);
     }                           /* else we want to copy y2 range, but need to fix it up first */      }
     if (uses_axis[SECOND_Y_AXIS]) {      if (uses_axis[SECOND_Y_AXIS]) {
         if (max_array[SECOND_Y_AXIS] == -VERYLARGE ||          if (max_array[SECOND_Y_AXIS] == -VERYLARGE ||
             min_array[SECOND_Y_AXIS] == VERYLARGE)              min_array[SECOND_Y_AXIS] == VERYLARGE)
Line 1234  do{ assert(!polar && !parametric); \
Line 1253  do{ assert(!polar && !parametric); \
         fixup_range(SECOND_Y_AXIS, "y2");          fixup_range(SECOND_Y_AXIS, "y2");
         FIXUP_RANGE_FOR_LOG(SECOND_Y_AXIS, y2);          FIXUP_RANGE_FOR_LOG(SECOND_Y_AXIS, y2);
     } else {      } else {
           /* else we want to copy y2 range */
         assert(uses_axis[FIRST_Y_AXIS]);          assert(uses_axis[FIRST_Y_AXIS]);
         if (auto_array[SECOND_Y_AXIS] & 1)          if (auto_array[SECOND_Y_AXIS] & 1)
             min_array[SECOND_Y_AXIS] = min_array[FIRST_Y_AXIS];              min_array[SECOND_Y_AXIS] = min_array[FIRST_Y_AXIS];
         if (auto_array[SECOND_Y_AXIS] & 2)          if (auto_array[SECOND_Y_AXIS] & 2)
             max_array[SECOND_Y_AXIS] = max_array[FIRST_Y_AXIS];              max_array[SECOND_Y_AXIS] = max_array[FIRST_Y_AXIS];
           /* Log() fixup is only necessary if the range was *not* copied from
            * the (already logarithmized) yrange */
           if (! auto_array[SECOND_Y_AXIS])
               FIXUP_RANGE_FOR_LOG(SECOND_Y_AXIS, y2);
     }      }
   
     if (!uses_axis[FIRST_Y_AXIS]) {      if (!uses_axis[FIRST_Y_AXIS]) {
         assert(uses_axis[SECOND_Y_AXIS]);          assert(uses_axis[SECOND_Y_AXIS]);
         if (auto_array[FIRST_Y_AXIS] & 1)          if (auto_array[FIRST_Y_AXIS] & 1)
Line 1248  do{ assert(!polar && !parametric); \
Line 1271  do{ assert(!polar && !parametric); \
         if (auto_array[FIRST_Y_AXIS] & 2)          if (auto_array[FIRST_Y_AXIS] & 2)
             max_array[FIRST_Y_AXIS] = max_array[SECOND_Y_AXIS];              max_array[FIRST_Y_AXIS] = max_array[SECOND_Y_AXIS];
     }      }
   
 #define WRITEBACK(axis,min,max) \  #define WRITEBACK(axis,min,max) \
 if(range_flags[axis]&RANGE_WRITEBACK) \  if(range_flags[axis]&RANGE_WRITEBACK) \
   {if (auto_array[axis]&1) min = min_array[axis]; \    {if (auto_array[axis]&1) min = min_array[axis]; \
Line 1258  if(range_flags[axis]&RANGE_WRITEBACK) \
Line 1282  if(range_flags[axis]&RANGE_WRITEBACK) \
         WRITEBACK(FIRST_Y_AXIS, ymin, ymax)          WRITEBACK(FIRST_Y_AXIS, ymin, ymax)
         WRITEBACK(SECOND_X_AXIS, x2min, x2max)          WRITEBACK(SECOND_X_AXIS, x2min, x2max)
         WRITEBACK(SECOND_Y_AXIS, y2min, y2max)          WRITEBACK(SECOND_Y_AXIS, y2min, y2max)
         if (strcmp(term->name, "table") == 0)  
       if (strcmp(term->name, "table") == 0)
         print_table(first_plot, plot_num);          print_table(first_plot, plot_num);
     else {      else {
         START_LEAK_CHECK();     /* check for memory leaks in this routine */          START_LEAK_CHECK();     /* check for memory leaks in this routine */

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>