home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-10-05 | 62.5 KB | 2,592 lines |
- *** ./graphics.c Tue Mar 27 09:01:22 1990
- --- ../patch1/graphics.c Mon Sep 10 09:57:37 1990
- ***************
- *** 60,66
- static int xleft, xright, ybot, ytop;
-
- /* Boundary and scale factors, in user coordinates */
- ! static double xmin, xmax, ymin, ymax;
- static double xscale, yscale;
-
- /* And the functions to map from user to terminal coordinates */
-
- --- 60,69 -----
- static int xleft, xright, ybot, ytop;
-
- /* Boundary and scale factors, in user coordinates */
- ! /* x_min, x_max, y_min, y_max are local to this file and
- ! * are not the same as variables of the same names in other files
- ! */
- ! static double x_min, x_max, y_min, y_max;
- static double xscale, yscale;
-
- /* And the functions to map from user to terminal coordinates */
- ***************
- *** 64,71
- static double xscale, yscale;
-
- /* And the functions to map from user to terminal coordinates */
- ! #define map_x(x) (int)(xleft+(x-xmin)*xscale+0.5) /* maps floating point x to screen */
- ! #define map_y(y) (int)(ybot+(y-ymin)*yscale+0.5) /* same for y */
-
- /* (DFK) Watch for cancellation error near zero on axes labels */
- #define SIGNIF (0.01) /* less than one hundredth of a tic mark */
-
- --- 67,74 -----
- static double xscale, yscale;
-
- /* And the functions to map from user to terminal coordinates */
- ! #define map_x(x) (int)(xleft+(x-x_min)*xscale+0.5) /* maps floating point x to screen */
- ! #define map_y(y) (int)(ybot+(y-y_min)*yscale+0.5) /* same for y */
-
- /* (DFK) Watch for cancellation error near zero on axes labels */
- #define SIGNIF (0.01) /* less than one hundredth of a tic mark */
- ***************
- *** 108,115
- int_error(errbuf, NO_CARET);
- } else
- return(log10(coord));
- - } else {
- - return(coord);
- }
- return((double)NULL); /* shut lint up */
- }
-
- --- 111,116 -----
- int_error(errbuf, NO_CARET);
- } else
- return(log10(coord));
- }
- return(coord);
- }
- ***************
- *** 111,117
- } else {
- return(coord);
- }
- ! return((double)NULL); /* shut lint up */
- }
-
- /* borders of plotting area */
-
- --- 112,118 -----
- } else
- return(log10(coord));
- }
- ! return(coord);
- }
-
- /* borders of plotting area */
- ***************
- *** 187,196
-
- /* store these in variables global to this file */
- /* otherwise, we have to pass them around a lot */
- ! xmin = min_x;
- ! xmax = max_x;
- ! ymin = min_y;
- ! ymax = max_y;
-
- if (polar) {
- /* will possibly change xmin, xmax, ymin, ymax */
-
- --- 188,197 -----
-
- /* store these in variables global to this file */
- /* otherwise, we have to pass them around a lot */
- ! x_min = min_x;
- ! x_max = max_x;
- ! y_min = min_y;
- ! y_max = max_y;
-
- if (polar) {
- /* will possibly change x_min, x_max, y_min, y_max */
- ***************
- *** 193,199
- ymax = max_y;
-
- if (polar) {
- ! /* will possibly change xmin, xmax, ymin, ymax */
- polar_xform(plots,pcount);
- }
-
-
- --- 194,200 -----
- y_max = max_y;
-
- if (polar) {
- ! /* will possibly change x_min, x_max, y_min, y_max */
- polar_xform(plots,pcount);
- }
-
- ***************
- *** 197,203
- polar_xform(plots,pcount);
- }
-
- ! if (ymin == VERYLARGE || ymax == -VERYLARGE)
- int_error("all points undefined!", NO_CARET);
-
- if (xmin == VERYLARGE || xmax == -VERYLARGE)
-
- --- 198,204 -----
- polar_xform(plots,pcount);
- }
-
- ! if (y_min == VERYLARGE || y_max == -VERYLARGE)
- int_error("all points undefined!", NO_CARET);
-
- if (x_min == VERYLARGE || x_max == -VERYLARGE)
- ***************
- *** 200,206
- if (ymin == VERYLARGE || ymax == -VERYLARGE)
- int_error("all points undefined!", NO_CARET);
-
- ! if (xmin == VERYLARGE || xmax == -VERYLARGE)
- int_error("all points undefined!", NO_CARET);
-
- /* Apply the desired viewport offsets. */
-
- --- 201,207 -----
- if (y_min == VERYLARGE || y_max == -VERYLARGE)
- int_error("all points undefined!", NO_CARET);
-
- ! if (x_min == VERYLARGE || x_max == -VERYLARGE)
- int_error("all points undefined!", NO_CARET);
-
- /* Apply the desired viewport offsets. */
- ***************
- *** 204,212
- int_error("all points undefined!", NO_CARET);
-
- /* Apply the desired viewport offsets. */
- ! if (ymin < ymax) {
- ! ymin -= boff;
- ! ymax += toff;
- } else {
- ymax -= boff;
- ymin += toff;
-
- --- 205,213 -----
- int_error("all points undefined!", NO_CARET);
-
- /* Apply the desired viewport offsets. */
- ! if (y_min < y_max) {
- ! y_min -= boff;
- ! y_max += toff;
- } else {
- y_max -= boff;
- y_min += toff;
- ***************
- *** 208,215
- ymin -= boff;
- ymax += toff;
- } else {
- ! ymax -= boff;
- ! ymin += toff;
- }
- if (xmin < xmax) {
- xmin -= loff;
-
- --- 209,216 -----
- y_min -= boff;
- y_max += toff;
- } else {
- ! y_max -= boff;
- ! y_min += toff;
- }
- if (x_min < x_max) {
- x_min -= loff;
- ***************
- *** 211,219
- ymax -= boff;
- ymin += toff;
- }
- ! if (xmin < xmax) {
- ! xmin -= loff;
- ! xmax += roff;
- } else {
- xmax -= loff;
- xmin += roff;
-
- --- 212,220 -----
- y_max -= boff;
- y_min += toff;
- }
- ! if (x_min < x_max) {
- ! x_min -= loff;
- ! x_max += roff;
- } else {
- x_max -= loff;
- x_min += roff;
- ***************
- *** 215,222
- xmin -= loff;
- xmax += roff;
- } else {
- ! xmax -= loff;
- ! xmin += roff;
- }
-
- /* SETUP RANGES, SCALES AND TIC PLACES */
-
- --- 216,223 -----
- x_min -= loff;
- x_max += roff;
- } else {
- ! x_max -= loff;
- ! x_min += roff;
- }
-
- /* SETUP RANGES, SCALES AND TIC PLACES */
- ***************
- *** 221,227
-
- /* SETUP RANGES, SCALES AND TIC PLACES */
- if (ytics && yticdef.type == TIC_COMPUTED) {
- ! ytic = make_tics(ymin,ymax,log_y);
-
- if (autoscale_ly) {
- if (ymin < ymax) {
-
- --- 222,228 -----
-
- /* SETUP RANGES, SCALES AND TIC PLACES */
- if (ytics && yticdef.type == TIC_COMPUTED) {
- ! ytic = make_tics(y_min,y_max,log_y);
-
- if (autoscale_ly) {
- if (y_min < y_max) {
- ***************
- *** 224,232
- ytic = make_tics(ymin,ymax,log_y);
-
- if (autoscale_ly) {
- ! if (ymin < ymax) {
- ! ymin = ytic * floor(ymin/ytic);
- ! ymax = ytic * ceil(ymax/ytic);
- }
- else { /* reverse axis */
- ymin = ytic * ceil(ymin/ytic);
-
- --- 225,233 -----
- ytic = make_tics(y_min,y_max,log_y);
-
- if (autoscale_ly) {
- ! if (y_min < y_max) {
- ! y_min = ytic * floor(y_min/ytic);
- ! y_max = ytic * ceil(y_max/ytic);
- }
- else { /* reverse axis */
- y_min = ytic * ceil(y_min/ytic);
- ***************
- *** 229,236
- ymax = ytic * ceil(ymax/ytic);
- }
- else { /* reverse axis */
- ! ymin = ytic * ceil(ymin/ytic);
- ! ymax = ytic * floor(ymax/ytic);
- }
- }
- }
-
- --- 230,237 -----
- y_max = ytic * ceil(y_max/ytic);
- }
- else { /* reverse axis */
- ! y_min = ytic * ceil(y_min/ytic);
- ! y_max = ytic * floor(y_max/ytic);
- }
- }
- }
- ***************
- *** 236,242
- }
-
- if (xtics && xticdef.type == TIC_COMPUTED) {
- ! xtic = make_tics(xmin,xmax,log_x);
-
- if (autoscale_lx) {
- if (xmin < xmax) {
-
- --- 237,243 -----
- }
-
- if (xtics && xticdef.type == TIC_COMPUTED) {
- ! xtic = make_tics(x_min,x_max,log_x);
-
- if (autoscale_lx) {
- if (x_min < x_max) {
- ***************
- *** 239,247
- xtic = make_tics(xmin,xmax,log_x);
-
- if (autoscale_lx) {
- ! if (xmin < xmax) {
- ! xmin = xtic * floor(xmin/xtic);
- ! xmax = xtic * ceil(xmax/xtic);
- } else {
- xmin = xtic * ceil(xmin/xtic);
- xmax = xtic * floor(xmax/xtic);
-
- --- 240,248 -----
- xtic = make_tics(x_min,x_max,log_x);
-
- if (autoscale_lx) {
- ! if (x_min < x_max) {
- ! x_min = xtic * floor(x_min/xtic);
- ! x_max = xtic * ceil(x_max/xtic);
- } else {
- x_min = xtic * ceil(x_min/xtic);
- x_max = xtic * floor(x_max/xtic);
- ***************
- *** 243,250
- xmin = xtic * floor(xmin/xtic);
- xmax = xtic * ceil(xmax/xtic);
- } else {
- ! xmin = xtic * ceil(xmin/xtic);
- ! xmax = xtic * floor(xmax/xtic);
- }
- }
- }
-
- --- 244,251 -----
- x_min = xtic * floor(x_min/xtic);
- x_max = xtic * ceil(x_max/xtic);
- } else {
- ! x_min = xtic * ceil(x_min/xtic);
- ! x_max = xtic * floor(x_max/xtic);
- }
- }
- }
- ***************
- *** 249,259
- }
- }
-
- ! /* This used be xmax == xmin, but that caused an infinite loop once. */
- ! if (fabs(xmax - xmin) < zero)
- ! int_error("xmin should not equal xmax!",NO_CARET);
- ! if (fabs(ymax - ymin) < zero)
- ! int_error("ymin should not equal ymax!",NO_CARET);
-
- /* INITIALIZE TERMINAL */
- if (!term_init) {
-
- --- 250,260 -----
- }
- }
-
- ! /* This used be x_max == x_min, but that caused an infinite loop once. */
- ! if (fabs(x_max - x_min) < zero)
- ! int_error("x_min should not equal x_max!",NO_CARET);
- ! if (fabs(y_max - y_min) < zero)
- ! int_error("y_min should not equal y_max!",NO_CARET);
-
- /* INITIALIZE TERMINAL */
- if (!term_init) {
- ***************
- *** 268,275
- boundary(scaling);
-
- /* SCALE FACTORS */
- ! yscale = (ytop - ybot)/(ymax - ymin);
- ! xscale = (xright - xleft)/(xmax - xmin);
-
- /* DRAW AXES */
- (*t->linetype)(-1); /* axis line type */
-
- --- 269,276 -----
- boundary(scaling);
-
- /* SCALE FACTORS */
- ! yscale = (ytop - ybot)/(y_max - y_min);
- ! xscale = (xright - xleft)/(x_max - x_min);
-
- /* DRAW AXES */
- (*t->linetype)(-1); /* axis line type */
- ***************
- *** 297,304
- if (ytics) {
- switch (yticdef.type) {
- case TIC_COMPUTED: {
- ! if (ymin < ymax)
- ! draw_ytics(ytic * floor(ymin/ytic),
- ytic,
- ytic * ceil(ymax/ytic));
- else
-
- --- 298,305 -----
- if (ytics) {
- switch (yticdef.type) {
- case TIC_COMPUTED: {
- ! if (y_min < y_max)
- ! draw_ytics(ytic * floor(y_min/ytic),
- ytic,
- ytic * ceil(y_max/ytic));
- else
- ***************
- *** 300,306
- if (ymin < ymax)
- draw_ytics(ytic * floor(ymin/ytic),
- ytic,
- ! ytic * ceil(ymax/ytic));
- else
- draw_ytics(ytic * floor(ymax/ytic),
- ytic,
-
- --- 301,307 -----
- if (y_min < y_max)
- draw_ytics(ytic * floor(y_min/ytic),
- ytic,
- ! ytic * ceil(y_max/ytic));
- else
- draw_ytics(ytic * floor(y_max/ytic),
- ytic,
- ***************
- *** 302,308
- ytic,
- ytic * ceil(ymax/ytic));
- else
- ! draw_ytics(ytic * floor(ymax/ytic),
- ytic,
- ytic * ceil(ymin/ytic));
-
-
- --- 303,309 -----
- ytic,
- ytic * ceil(y_max/ytic));
- else
- ! draw_ytics(ytic * floor(y_max/ytic),
- ytic,
- ytic * ceil(y_min/ytic));
-
- ***************
- *** 304,310
- else
- draw_ytics(ytic * floor(ymax/ytic),
- ytic,
- ! ytic * ceil(ymin/ytic));
-
- break;
- }
-
- --- 305,311 -----
- else
- draw_ytics(ytic * floor(y_max/ytic),
- ytic,
- ! ytic * ceil(y_min/ytic));
-
- break;
- }
- ***************
- *** 309,317
- break;
- }
- case TIC_SERIES: {
- ! draw_ytics(yticdef.def.series.start,
- ! yticdef.def.series.incr,
- ! yticdef.def.series.end);
- break;
- }
- case TIC_USER: {
-
- --- 310,318 -----
- break;
- }
- case TIC_SERIES: {
- ! draw_series_ytics(yticdef.def.series.start,
- ! yticdef.def.series.incr,
- ! yticdef.def.series.end);
- break;
- }
- case TIC_USER: {
- ***************
- *** 315,321
- break;
- }
- case TIC_USER: {
- ! draw_user_ytics(yticdef.def.user);
- break;
- }
- default: {
-
- --- 316,322 -----
- break;
- }
- case TIC_USER: {
- ! draw_set_ytics(yticdef.def.user);
- break;
- }
- default: {
- ***************
- *** 331,338
- if (xtics) {
- switch (xticdef.type) {
- case TIC_COMPUTED: {
- ! if (xmin < xmax)
- ! draw_xtics(xtic * floor(xmin/xtic),
- xtic,
- xtic * ceil(xmax/xtic));
- else
-
- --- 332,339 -----
- if (xtics) {
- switch (xticdef.type) {
- case TIC_COMPUTED: {
- ! if (x_min < x_max)
- ! draw_xtics(xtic * floor(x_min/xtic),
- xtic,
- xtic * ceil(x_max/xtic));
- else
- ***************
- *** 334,340
- if (xmin < xmax)
- draw_xtics(xtic * floor(xmin/xtic),
- xtic,
- ! xtic * ceil(xmax/xtic));
- else
- draw_xtics(xtic * floor(xmax/xtic),
- xtic,
-
- --- 335,341 -----
- if (x_min < x_max)
- draw_xtics(xtic * floor(x_min/xtic),
- xtic,
- ! xtic * ceil(x_max/xtic));
- else
- draw_xtics(xtic * floor(x_max/xtic),
- xtic,
- ***************
- *** 336,342
- xtic,
- xtic * ceil(xmax/xtic));
- else
- ! draw_xtics(xtic * floor(xmax/xtic),
- xtic,
- xtic * ceil(xmin/xtic));
-
-
- --- 337,343 -----
- xtic,
- xtic * ceil(x_max/xtic));
- else
- ! draw_xtics(xtic * floor(x_max/xtic),
- xtic,
- xtic * ceil(x_min/xtic));
-
- ***************
- *** 338,344
- else
- draw_xtics(xtic * floor(xmax/xtic),
- xtic,
- ! xtic * ceil(xmin/xtic));
-
- break;
- }
-
- --- 339,345 -----
- else
- draw_xtics(xtic * floor(x_max/xtic),
- xtic,
- ! xtic * ceil(x_min/xtic));
-
- break;
- }
- ***************
- *** 343,351
- break;
- }
- case TIC_SERIES: {
- ! draw_xtics(xticdef.def.series.start,
- ! xticdef.def.series.incr,
- ! xticdef.def.series.end);
- break;
- }
- case TIC_USER: {
-
- --- 344,352 -----
- break;
- }
- case TIC_SERIES: {
- ! draw_series_xtics(xticdef.def.series.start,
- ! xticdef.def.series.incr,
- ! xticdef.def.series.end);
- break;
- }
- case TIC_USER: {
- ***************
- *** 349,355
- break;
- }
- case TIC_USER: {
- ! draw_user_xtics(xticdef.def.user);
- break;
- }
- default: {
-
- --- 350,356 -----
- break;
- }
- case TIC_USER: {
- ! draw_set_xtics(xticdef.def.user);
- break;
- }
- default: {
- ***************
- *** 551,557
- break;
- }
- case OUTRANGE: {
- ! if (!inrange(plot->points[i].x, xmin,xmax))
- continue;
- x = map_x(plot->points[i].x);
- if ((ymin < ymax
-
- --- 552,558 -----
- break;
- }
- case OUTRANGE: {
- ! if (!inrange(plot->points[i].x, x_min,x_max))
- continue;
- x = map_x(plot->points[i].x);
- if ((y_min < y_max
- ***************
- *** 554,569
- if (!inrange(plot->points[i].x, xmin,xmax))
- continue;
- x = map_x(plot->points[i].x);
- ! if ((ymin < ymax
- ! && plot->points[i].y < ymin)
- ! || (ymax < ymin
- ! && plot->points[i].y > ymin))
- ! y = map_y(ymin);
- ! if ((ymin < ymax
- ! && plot->points[i].y > ymax)
- ! || (ymax<ymin
- ! && plot->points[i].y < ymax))
- ! y = map_y(ymax);
- break;
- }
- default: /* just a safety */
-
- --- 555,570 -----
- if (!inrange(plot->points[i].x, x_min,x_max))
- continue;
- x = map_x(plot->points[i].x);
- ! if ((y_min < y_max
- ! && plot->points[i].y < y_min)
- ! || (y_max < y_min
- ! && plot->points[i].y > y_min))
- ! y = map_y(y_min);
- ! if ((y_min < y_max
- ! && plot->points[i].y > y_max)
- ! || (y_max<y_min
- ! && plot->points[i].y < y_max))
- ! y = map_y(y_max);
- break;
- }
- default: /* just a safety */
- ***************
- *** 699,705
- int i; /* line segment from point i-1 to point i */
- double *ex, *ey; /* the point where it crosses an edge */
- {
- ! /* global xmin, xmax, ymin, xmax */
- double ax = points[i-1].x;
- double ay = points[i-1].y;
- double bx = points[i].x;
-
- --- 700,706 -----
- int i; /* line segment from point i-1 to point i */
- double *ex, *ey; /* the point where it crosses an edge */
- {
- ! /* global x_min, x_max, y_min, x_max */
- double ax = points[i-1].x;
- double ay = points[i-1].y;
- double bx = points[i].x;
- ***************
- *** 708,714
-
- if (by == ay) {
- /* horizontal line */
- ! /* assume inrange(by, ymin, ymax) */
- *ey = by; /* == ay */
-
- if (inrange(xmax, ax, bx))
-
- --- 709,715 -----
-
- if (by == ay) {
- /* horizontal line */
- ! /* assume inrange(by, y_min, y_max) */
- *ey = by; /* == ay */
-
- if (inrange(x_max, ax, bx))
- ***************
- *** 711,720
- /* assume inrange(by, ymin, ymax) */
- *ey = by; /* == ay */
-
- ! if (inrange(xmax, ax, bx))
- ! *ex = xmax;
- ! else if (inrange(xmin, ax, bx))
- ! *ex = xmin;
- else {
- (*term_tbl[term].text)();
- (void) fflush(outfile);
-
- --- 712,721 -----
- /* assume inrange(by, y_min, y_max) */
- *ey = by; /* == ay */
-
- ! if (inrange(x_max, ax, bx))
- ! *ex = x_max;
- ! else if (inrange(x_min, ax, bx))
- ! *ex = x_min;
- else {
- (*term_tbl[term].text)();
- (void) fflush(outfile);
- ***************
- *** 723,729
- return;
- } else if (bx == ax) {
- /* vertical line */
- ! /* assume inrange(bx, xmin, xmax) */
- *ex = bx; /* == ax */
-
- if (inrange(ymax, ay, by))
-
- --- 724,730 -----
- return;
- } else if (bx == ax) {
- /* vertical line */
- ! /* assume inrange(bx, x_min, x_max) */
- *ex = bx; /* == ax */
-
- if (inrange(y_max, ay, by))
- ***************
- *** 726,735
- /* assume inrange(bx, xmin, xmax) */
- *ex = bx; /* == ax */
-
- ! if (inrange(ymax, ay, by))
- ! *ey = ymax;
- ! else if (inrange(ymin, ay, by))
- ! *ey = ymin;
- else {
- (*term_tbl[term].text)();
- (void) fflush(outfile);
-
- --- 727,736 -----
- /* assume inrange(bx, x_min, x_max) */
- *ex = bx; /* == ax */
-
- ! if (inrange(y_max, ay, by))
- ! *ey = y_max;
- ! else if (inrange(y_min, ay, by))
- ! *ey = y_min;
- else {
- (*term_tbl[term].text)();
- (void) fflush(outfile);
- ***************
- *** 740,749
-
- /* slanted line of some kind */
-
- ! /* does it intersect ymin edge */
- ! if (inrange(ymin, ay, by) && ymin != ay && ymin != by) {
- ! x = ax + (ymin-ay) * ((bx-ax) / (by-ay));
- ! if (inrange(x, xmin, xmax)) {
- *ex = x;
- *ey = ymin;
- return; /* yes */
-
- --- 741,750 -----
-
- /* slanted line of some kind */
-
- ! /* does it intersect y_min edge */
- ! if (inrange(y_min, ay, by) && y_min != ay && y_min != by) {
- ! x = ax + (y_min-ay) * ((bx-ax) / (by-ay));
- ! if (inrange(x, x_min, x_max)) {
- *ex = x;
- *ey = y_min;
- return; /* yes */
- ***************
- *** 745,751
- x = ax + (ymin-ay) * ((bx-ax) / (by-ay));
- if (inrange(x, xmin, xmax)) {
- *ex = x;
- ! *ey = ymin;
- return; /* yes */
- }
- }
-
- --- 746,752 -----
- x = ax + (y_min-ay) * ((bx-ax) / (by-ay));
- if (inrange(x, x_min, x_max)) {
- *ex = x;
- ! *ey = y_min;
- return; /* yes */
- }
- }
- ***************
- *** 750,759
- }
- }
-
- ! /* does it intersect ymax edge */
- ! if (inrange(ymax, ay, by) && ymax != ay && ymax != by) {
- ! x = ax + (ymax-ay) * ((bx-ax) / (by-ay));
- ! if (inrange(x, xmin, xmax)) {
- *ex = x;
- *ey = ymax;
- return; /* yes */
-
- --- 751,760 -----
- }
- }
-
- ! /* does it intersect y_max edge */
- ! if (inrange(y_max, ay, by) && y_max != ay && y_max != by) {
- ! x = ax + (y_max-ay) * ((bx-ax) / (by-ay));
- ! if (inrange(x, x_min, x_max)) {
- *ex = x;
- *ey = y_max;
- return; /* yes */
- ***************
- *** 755,761
- x = ax + (ymax-ay) * ((bx-ax) / (by-ay));
- if (inrange(x, xmin, xmax)) {
- *ex = x;
- ! *ey = ymax;
- return; /* yes */
- }
- }
-
- --- 756,762 -----
- x = ax + (y_max-ay) * ((bx-ax) / (by-ay));
- if (inrange(x, x_min, x_max)) {
- *ex = x;
- ! *ey = y_max;
- return; /* yes */
- }
- }
- ***************
- *** 760,770
- }
- }
-
- ! /* does it intersect xmin edge */
- ! if (inrange(xmin, ax, bx) && xmin != ax && xmin != bx) {
- ! y = ay + (xmin-ax) * ((by-ay) / (bx-ax));
- ! if (inrange(y, ymin, ymax)) {
- ! *ex = xmin;
- *ey = y;
- return;
- }
-
- --- 761,771 -----
- }
- }
-
- ! /* does it intersect x_min edge */
- ! if (inrange(x_min, ax, bx) && x_min != ax && x_min != bx) {
- ! y = ay + (x_min-ax) * ((by-ay) / (bx-ax));
- ! if (inrange(y, y_min, y_max)) {
- ! *ex = x_min;
- *ey = y;
- return;
- }
- ***************
- *** 770,780
- }
- }
-
- ! /* does it intersect xmax edge */
- ! if (inrange(xmax, ax, bx) && xmax != ax && xmax != bx) {
- ! y = ay + (xmax-ax) * ((by-ay) / (bx-ax));
- ! if (inrange(y, ymin, ymax)) {
- ! *ex = xmax;
- *ey = y;
- return;
- }
-
- --- 771,781 -----
- }
- }
-
- ! /* does it intersect x_max edge */
- ! if (inrange(x_max, ax, bx) && x_max != ax && x_max != bx) {
- ! y = ay + (x_max-ax) * ((by-ay) / (bx-ax));
- ! if (inrange(y, y_min, y_max)) {
- ! *ex = x_max;
- *ey = y;
- return;
- }
- ***************
- *** 791,797
- */
- if (ax == -VERYLARGE) {
- if (ay != -VERYLARGE) {
- ! *ex = min(xmin, xmax);
- *ey = by;
- return;
- }
-
- --- 792,798 -----
- */
- if (ax == -VERYLARGE) {
- if (ay != -VERYLARGE) {
- ! *ex = min(x_min, x_max);
- *ey = by;
- return;
- }
- ***************
- *** 797,803
- }
- } else if (bx == -VERYLARGE) {
- if (by != -VERYLARGE) {
- ! *ex = min(xmin, xmax);
- *ey = ay;
- return;
- }
-
- --- 798,804 -----
- }
- } else if (bx == -VERYLARGE) {
- if (by != -VERYLARGE) {
- ! *ex = min(x_min, x_max);
- *ey = ay;
- return;
- }
- ***************
- *** 804,810
- } else if (ay == -VERYLARGE) {
- /* note we know ax != -VERYLARGE */
- *ex = bx;
- ! *ey = min(ymin, ymax);
- return;
- } else if (by == -VERYLARGE) {
- /* note we know bx != -VERYLARGE */
-
- --- 805,811 -----
- } else if (ay == -VERYLARGE) {
- /* note we know ax != -VERYLARGE */
- *ex = bx;
- ! *ey = min(y_min, y_max);
- return;
- } else if (by == -VERYLARGE) {
- /* note we know bx != -VERYLARGE */
- ***************
- *** 809,815
- } else if (by == -VERYLARGE) {
- /* note we know bx != -VERYLARGE */
- *ex = ax;
- ! *ey = min(ymin, ymax);
- return;
- }
-
-
- --- 810,816 -----
- } else if (by == -VERYLARGE) {
- /* note we know bx != -VERYLARGE */
- *ex = ax;
- ! *ey = min(y_min, y_max);
- return;
- }
-
- ***************
- *** 846,852
- int i; /* line segment from point i-1 to point i */
- double *lx, *ly; /* lx[2], ly[2]: points where it crosses edges */
- {
- ! /* global xmin, xmax, ymin, xmax */
- double ax = points[i-1].x;
- double ay = points[i-1].y;
- double bx = points[i].x;
-
- --- 847,853 -----
- int i; /* line segment from point i-1 to point i */
- double *lx, *ly; /* lx[2], ly[2]: points where it crosses edges */
- {
- ! /* global x_min, x_max, y_min, x_max */
- double ax = points[i-1].x;
- double ay = points[i-1].y;
- double bx = points[i].x;
- ***************
- *** 856,865
-
- if (by == ay) {
- /* horizontal line */
- ! /* y coord must be in range, and line must span both xmin and xmax */
- ! /* note that spanning xmin implies spanning xmax */
- ! if (inrange(by, ymin, ymax) && inrange(xmin, ax, bx)) {
- ! *lx++ = xmin;
- *ly++ = by;
- *lx++ = xmax;
- *ly++ = by;
-
- --- 857,866 -----
-
- if (by == ay) {
- /* horizontal line */
- ! /* y coord must be in range, and line must span both x_min and x_max */
- ! /* note that spanning x_min implies spanning x_max */
- ! if (inrange(by, y_min, y_max) && inrange(x_min, ax, bx)) {
- ! *lx++ = x_min;
- *ly++ = by;
- *lx++ = x_max;
- *ly++ = by;
- ***************
- *** 861,867
- if (inrange(by, ymin, ymax) && inrange(xmin, ax, bx)) {
- *lx++ = xmin;
- *ly++ = by;
- ! *lx++ = xmax;
- *ly++ = by;
- return(TRUE);
- } else
-
- --- 862,868 -----
- if (inrange(by, y_min, y_max) && inrange(x_min, ax, bx)) {
- *lx++ = x_min;
- *ly++ = by;
- ! *lx++ = x_max;
- *ly++ = by;
- return(TRUE);
- } else
- ***************
- *** 868,876
- return(FALSE);
- } else if (bx == ax) {
- /* vertical line */
- ! /* x coord must be in range, and line must span both ymin and ymax */
- ! /* note that spanning ymin implies spanning ymax */
- ! if (inrange(bx, xmin, xmax) && inrange(ymin, ay, by)) {
- *lx++ = bx;
- *ly++ = ymin;
- *lx++ = bx;
-
- --- 869,877 -----
- return(FALSE);
- } else if (bx == ax) {
- /* vertical line */
- ! /* x coord must be in range, and line must span both y_min and y_max */
- ! /* note that spanning y_min implies spanning y_max */
- ! if (inrange(bx, x_min, x_max) && inrange(y_min, ay, by)) {
- *lx++ = bx;
- *ly++ = y_min;
- *lx++ = bx;
- ***************
- *** 872,878
- /* note that spanning ymin implies spanning ymax */
- if (inrange(bx, xmin, xmax) && inrange(ymin, ay, by)) {
- *lx++ = bx;
- ! *ly++ = ymin;
- *lx++ = bx;
- *ly++ = ymax;
- return(TRUE);
-
- --- 873,879 -----
- /* note that spanning y_min implies spanning y_max */
- if (inrange(bx, x_min, x_max) && inrange(y_min, ay, by)) {
- *lx++ = bx;
- ! *ly++ = y_min;
- *lx++ = bx;
- *ly++ = y_max;
- return(TRUE);
- ***************
- *** 874,880
- *lx++ = bx;
- *ly++ = ymin;
- *lx++ = bx;
- ! *ly++ = ymax;
- return(TRUE);
- } else
- return(FALSE);
-
- --- 875,881 -----
- *lx++ = bx;
- *ly++ = y_min;
- *lx++ = bx;
- ! *ly++ = y_max;
- return(TRUE);
- } else
- return(FALSE);
- ***************
- *** 883,892
- /* slanted line of some kind */
- /* there can be only zero or two intersections below */
-
- ! /* does it intersect ymin edge */
- ! if (inrange(ymin, ay, by)) {
- ! x = ax + (ymin-ay) * ((bx-ax) / (by-ay));
- ! if (inrange(x, xmin, xmax)) {
- *lx++ = x;
- *ly++ = ymin;
- intersect = TRUE;
-
- --- 884,893 -----
- /* slanted line of some kind */
- /* there can be only zero or two intersections below */
-
- ! /* does it intersect y_min edge */
- ! if (inrange(y_min, ay, by)) {
- ! x = ax + (y_min-ay) * ((bx-ax) / (by-ay));
- ! if (inrange(x, x_min, x_max)) {
- *lx++ = x;
- *ly++ = y_min;
- intersect = TRUE;
- ***************
- *** 888,894
- x = ax + (ymin-ay) * ((bx-ax) / (by-ay));
- if (inrange(x, xmin, xmax)) {
- *lx++ = x;
- ! *ly++ = ymin;
- intersect = TRUE;
- }
- }
-
- --- 889,895 -----
- x = ax + (y_min-ay) * ((bx-ax) / (by-ay));
- if (inrange(x, x_min, x_max)) {
- *lx++ = x;
- ! *ly++ = y_min;
- intersect = TRUE;
- }
- }
- ***************
- *** 893,902
- }
- }
-
- ! /* does it intersect ymax edge */
- ! if (inrange(ymax, ay, by)) {
- ! x = ax + (ymax-ay) * ((bx-ax) / (by-ay));
- ! if (inrange(x, xmin, xmax)) {
- *lx++ = x;
- *ly++ = ymax;
- intersect = TRUE;
-
- --- 894,903 -----
- }
- }
-
- ! /* does it intersect y_max edge */
- ! if (inrange(y_max, ay, by)) {
- ! x = ax + (y_max-ay) * ((bx-ax) / (by-ay));
- ! if (inrange(x, x_min, x_max)) {
- *lx++ = x;
- *ly++ = y_max;
- intersect = TRUE;
- ***************
- *** 898,904
- x = ax + (ymax-ay) * ((bx-ax) / (by-ay));
- if (inrange(x, xmin, xmax)) {
- *lx++ = x;
- ! *ly++ = ymax;
- intersect = TRUE;
- }
- }
-
- --- 899,905 -----
- x = ax + (y_max-ay) * ((bx-ax) / (by-ay));
- if (inrange(x, x_min, x_max)) {
- *lx++ = x;
- ! *ly++ = y_max;
- intersect = TRUE;
- }
- }
- ***************
- *** 903,913
- }
- }
-
- ! /* does it intersect xmin edge */
- ! if (inrange(xmin, ax, bx)) {
- ! y = ay + (xmin-ax) * ((by-ay) / (bx-ax));
- ! if (inrange(y, ymin, ymax)) {
- ! *lx++ = xmin;
- *ly++ = y;
- intersect = TRUE;
- }
-
- --- 904,914 -----
- }
- }
-
- ! /* does it intersect x_min edge */
- ! if (inrange(x_min, ax, bx)) {
- ! y = ay + (x_min-ax) * ((by-ay) / (bx-ax));
- ! if (inrange(y, y_min, y_max)) {
- ! *lx++ = x_min;
- *ly++ = y;
- intersect = TRUE;
- }
- ***************
- *** 913,923
- }
- }
-
- ! /* does it intersect xmax edge */
- ! if (inrange(xmax, ax, bx)) {
- ! y = ay + (xmax-ax) * ((by-ay) / (bx-ax));
- ! if (inrange(y, ymin, ymax)) {
- ! *lx++ = xmax;
- *ly++ = y;
- intersect = TRUE;
- }
-
- --- 914,924 -----
- }
- }
-
- ! /* does it intersect x_max edge */
- ! if (inrange(x_max, ax, bx)) {
- ! y = ay + (x_max-ax) * ((by-ay) / (bx-ax));
- ! if (inrange(y, y_min, y_max)) {
- ! *lx++ = x_max;
- *ly++ = y;
- intersect = TRUE;
- }
- ***************
- *** 935,942
- */
- if (ax == -VERYLARGE) {
- if (ay != -VERYLARGE
- ! && inrange(by, ymin, ymax) && inrange(xmax, ax, bx)) {
- ! *lx++ = xmin;
- *ly = by;
- *lx++ = xmax;
- *ly = by;
-
- --- 936,943 -----
- */
- if (ax == -VERYLARGE) {
- if (ay != -VERYLARGE
- ! && inrange(by, y_min, y_max) && inrange(x_max, ax, bx)) {
- ! *lx++ = x_min;
- *ly = by;
- *lx++ = x_max;
- *ly = by;
- ***************
- *** 938,944
- && inrange(by, ymin, ymax) && inrange(xmax, ax, bx)) {
- *lx++ = xmin;
- *ly = by;
- ! *lx++ = xmax;
- *ly = by;
- intersect = TRUE;
- }
-
- --- 939,945 -----
- && inrange(by, y_min, y_max) && inrange(x_max, ax, bx)) {
- *lx++ = x_min;
- *ly = by;
- ! *lx++ = x_max;
- *ly = by;
- intersect = TRUE;
- }
- ***************
- *** 944,951
- }
- } else if (bx == -VERYLARGE) {
- if (by != -VERYLARGE
- ! && inrange(ay, ymin, ymax) && inrange(xmax, ax, bx)) {
- ! *lx++ = xmin;
- *ly = ay;
- *lx++ = xmax;
- *ly = ay;
-
- --- 945,952 -----
- }
- } else if (bx == -VERYLARGE) {
- if (by != -VERYLARGE
- ! && inrange(ay, y_min, y_max) && inrange(x_max, ax, bx)) {
- ! *lx++ = x_min;
- *ly = ay;
- *lx++ = x_max;
- *ly = ay;
- ***************
- *** 947,953
- && inrange(ay, ymin, ymax) && inrange(xmax, ax, bx)) {
- *lx++ = xmin;
- *ly = ay;
- ! *lx++ = xmax;
- *ly = ay;
- intersect = TRUE;
- }
-
- --- 948,954 -----
- && inrange(ay, y_min, y_max) && inrange(x_max, ax, bx)) {
- *lx++ = x_min;
- *ly = ay;
- ! *lx++ = x_max;
- *ly = ay;
- intersect = TRUE;
- }
- ***************
- *** 953,959
- }
- } else if (ay == -VERYLARGE) {
- /* note we know ax != -VERYLARGE */
- ! if (inrange(bx, xmin, xmax) && inrange(ymax, ay, by)) {
- *lx++ = bx;
- *ly = ymin;
- *lx++ = bx;
-
- --- 954,960 -----
- }
- } else if (ay == -VERYLARGE) {
- /* note we know ax != -VERYLARGE */
- ! if (inrange(bx, x_min, x_max) && inrange(y_max, ay, by)) {
- *lx++ = bx;
- *ly = y_min;
- *lx++ = bx;
- ***************
- *** 955,961
- /* note we know ax != -VERYLARGE */
- if (inrange(bx, xmin, xmax) && inrange(ymax, ay, by)) {
- *lx++ = bx;
- ! *ly = ymin;
- *lx++ = bx;
- *ly = ymax;
- intersect = TRUE;
-
- --- 956,962 -----
- /* note we know ax != -VERYLARGE */
- if (inrange(bx, x_min, x_max) && inrange(y_max, ay, by)) {
- *lx++ = bx;
- ! *ly = y_min;
- *lx++ = bx;
- *ly = y_max;
- intersect = TRUE;
- ***************
- *** 957,963
- *lx++ = bx;
- *ly = ymin;
- *lx++ = bx;
- ! *ly = ymax;
- intersect = TRUE;
- }
- } else if (by == -VERYLARGE) {
-
- --- 958,964 -----
- *lx++ = bx;
- *ly = y_min;
- *lx++ = bx;
- ! *ly = y_max;
- intersect = TRUE;
- }
- } else if (by == -VERYLARGE) {
- ***************
- *** 962,968
- }
- } else if (by == -VERYLARGE) {
- /* note we know bx != -VERYLARGE */
- ! if (inrange(ax, xmin, xmax) && inrange(ymax, ay, by)) {
- *lx++ = ax;
- *ly = ymin;
- *lx++ = ax;
-
- --- 963,969 -----
- }
- } else if (by == -VERYLARGE) {
- /* note we know bx != -VERYLARGE */
- ! if (inrange(ax, x_min, x_max) && inrange(y_max, ay, by)) {
- *lx++ = ax;
- *ly = y_min;
- *lx++ = ax;
- ***************
- *** 964,970
- /* note we know bx != -VERYLARGE */
- if (inrange(ax, xmin, xmax) && inrange(ymax, ay, by)) {
- *lx++ = ax;
- ! *ly = ymin;
- *lx++ = ax;
- *ly = ymax;
- intersect = TRUE;
-
- --- 965,971 -----
- /* note we know bx != -VERYLARGE */
- if (inrange(ax, x_min, x_max) && inrange(y_max, ay, by)) {
- *lx++ = ax;
- ! *ly = y_min;
- *lx++ = ax;
- *ly = y_max;
- intersect = TRUE;
- ***************
- *** 966,972
- *lx++ = ax;
- *ly = ymin;
- *lx++ = ax;
- ! *ly = ymax;
- intersect = TRUE;
- }
- }
-
- --- 967,973 -----
- *lx++ = ax;
- *ly = y_min;
- *lx++ = ax;
- ! *ly = y_max;
- intersect = TRUE;
- }
- }
- ***************
- *** 993,1002
- If not autoscaling, use the yrange for both x and y ranges.
- */
- if (autoscale_ly) {
- ! xmin = VERYLARGE;
- ! ymin = VERYLARGE;
- ! xmax = -VERYLARGE;
- ! ymax = -VERYLARGE;
- autoscale_lx = TRUE;
- } else {
- xmin = ymin;
-
- --- 994,1003 -----
- If not autoscaling, use the yrange for both x and y ranges.
- */
- if (autoscale_ly) {
- ! x_min = VERYLARGE;
- ! y_min = VERYLARGE;
- ! x_max = -VERYLARGE;
- ! y_max = -VERYLARGE;
- autoscale_lx = TRUE;
- } else {
- x_min = y_min;
- ***************
- *** 999,1006
- ymax = -VERYLARGE;
- autoscale_lx = TRUE;
- } else {
- ! xmin = ymin;
- ! xmax = ymax;
- }
-
- this_plot = plots;
-
- --- 1000,1007 -----
- y_max = -VERYLARGE;
- autoscale_lx = TRUE;
- } else {
- ! x_min = y_min;
- ! x_max = y_max;
- }
-
- this_plot = plots;
- ***************
- *** 1017,1026
- pnts[i].x = x;
- pnts[i].y = y;
- if (autoscale_ly) {
- ! if (xmin > x) xmin = x;
- ! if (xmax < x) xmax = x;
- ! if (ymin > y) ymin = y;
- ! if (ymax < y) ymax = y;
- pnts[i].type = INRANGE;
- } else if(inrange(x, xmin, xmax) && inrange(y, ymin, ymax))
- pnts[i].type = INRANGE;
-
- --- 1018,1027 -----
- pnts[i].x = x;
- pnts[i].y = y;
- if (autoscale_ly) {
- ! if (x_min > x) x_min = x;
- ! if (x_max < x) x_max = x;
- ! if (y_min > y) y_min = y;
- ! if (y_max < y) y_max = y;
- pnts[i].type = INRANGE;
- } else if(inrange(x, x_min, x_max) && inrange(y, y_min, y_max))
- pnts[i].type = INRANGE;
- ***************
- *** 1022,1028
- if (ymin > y) ymin = y;
- if (ymax < y) ymax = y;
- pnts[i].type = INRANGE;
- ! } else if(inrange(x, xmin, xmax) && inrange(y, ymin, ymax))
- pnts[i].type = INRANGE;
- else
- pnts[i].type = OUTRANGE;
-
- --- 1023,1029 -----
- if (y_min > y) y_min = y;
- if (y_max < y) y_max = y;
- pnts[i].type = INRANGE;
- ! } else if(inrange(x, x_min, x_max) && inrange(y, y_min, y_max))
- pnts[i].type = INRANGE;
- else
- pnts[i].type = OUTRANGE;
- ***************
- *** 1030,1036
- }
- }
-
- ! if (autoscale_lx && anydefined && fabs(xmax - xmin) < zero) {
- /* This happens at least for the plot of 1/cos(x) (vertical line). */
- fprintf(stderr, "Warning: empty x range [%g:%g], ", xmin,xmax);
- if (xmin == 0.0) {
-
- --- 1031,1037 -----
- }
- }
-
- ! if (autoscale_lx && anydefined && fabs(x_max - x_min) < zero) {
- /* This happens at least for the plot of 1/cos(x) (vertical line). */
- fprintf(stderr, "Warning: empty x range [%g:%g], ", x_min,x_max);
- if (x_min == 0.0) {
- ***************
- *** 1032,1041
-
- if (autoscale_lx && anydefined && fabs(xmax - xmin) < zero) {
- /* This happens at least for the plot of 1/cos(x) (vertical line). */
- ! fprintf(stderr, "Warning: empty x range [%g:%g], ", xmin,xmax);
- ! if (xmin == 0.0) {
- ! xmin = -1;
- ! xmax = 1;
- } else {
- xmin *= 0.9;
- xmax *= 1.1;
-
- --- 1033,1042 -----
-
- if (autoscale_lx && anydefined && fabs(x_max - x_min) < zero) {
- /* This happens at least for the plot of 1/cos(x) (vertical line). */
- ! fprintf(stderr, "Warning: empty x range [%g:%g], ", x_min,x_max);
- ! if (x_min == 0.0) {
- ! x_min = -1;
- ! x_max = 1;
- } else {
- x_min *= 0.9;
- x_max *= 1.1;
- ***************
- *** 1037,1044
- xmin = -1;
- xmax = 1;
- } else {
- ! xmin *= 0.9;
- ! xmax *= 1.1;
- }
- fprintf(stderr, "adjusting to [%g:%g]\n", xmin,xmax);
- }
-
- --- 1038,1045 -----
- x_min = -1;
- x_max = 1;
- } else {
- ! x_min *= 0.9;
- ! x_max *= 1.1;
- }
- fprintf(stderr, "adjusting to [%g:%g]\n", x_min,x_max);
- }
- ***************
- *** 1040,1046
- xmin *= 0.9;
- xmax *= 1.1;
- }
- ! fprintf(stderr, "adjusting to [%g:%g]\n", xmin,xmax);
- }
- if (autoscale_ly && anydefined && fabs(ymax - ymin) < zero) {
- /* This happens at least for the plot of 1/sin(x) (horiz. line). */
-
- --- 1041,1047 -----
- x_min *= 0.9;
- x_max *= 1.1;
- }
- ! fprintf(stderr, "adjusting to [%g:%g]\n", x_min,x_max);
- }
- if (autoscale_ly && anydefined && fabs(y_max - y_min) < zero) {
- /* This happens at least for the plot of 1/sin(x) (horiz. line). */
- ***************
- *** 1042,1048
- }
- fprintf(stderr, "adjusting to [%g:%g]\n", xmin,xmax);
- }
- ! if (autoscale_ly && anydefined && fabs(ymax - ymin) < zero) {
- /* This happens at least for the plot of 1/sin(x) (horiz. line). */
- fprintf(stderr, "Warning: empty y range [%g:%g], ", ymin, ymax);
- if (ymin == 0.0) {
-
- --- 1043,1049 -----
- }
- fprintf(stderr, "adjusting to [%g:%g]\n", x_min,x_max);
- }
- ! if (autoscale_ly && anydefined && fabs(y_max - y_min) < zero) {
- /* This happens at least for the plot of 1/sin(x) (horiz. line). */
- fprintf(stderr, "Warning: empty y range [%g:%g], ", y_min, y_max);
- if (y_min == 0.0) {
- ***************
- *** 1044,1053
- }
- if (autoscale_ly && anydefined && fabs(ymax - ymin) < zero) {
- /* This happens at least for the plot of 1/sin(x) (horiz. line). */
- ! fprintf(stderr, "Warning: empty y range [%g:%g], ", ymin, ymax);
- ! if (ymin == 0.0) {
- ! ymin = -1;
- ! ymax = 1;
- } else {
- ymin *= 0.9;
- ymax *= 1.1;
-
- --- 1045,1054 -----
- }
- if (autoscale_ly && anydefined && fabs(y_max - y_min) < zero) {
- /* This happens at least for the plot of 1/sin(x) (horiz. line). */
- ! fprintf(stderr, "Warning: empty y range [%g:%g], ", y_min, y_max);
- ! if (y_min == 0.0) {
- ! y_min = -1;
- ! y_max = 1;
- } else {
- y_min *= 0.9;
- y_max *= 1.1;
- ***************
- *** 1049,1056
- ymin = -1;
- ymax = 1;
- } else {
- ! ymin *= 0.9;
- ! ymax *= 1.1;
- }
- fprintf(stderr, "adjusting to [%g:%g]\n", ymin, ymax);
- }
-
- --- 1050,1057 -----
- y_min = -1;
- y_max = 1;
- } else {
- ! y_min *= 0.9;
- ! y_max *= 1.1;
- }
- fprintf(stderr, "adjusting to [%g:%g]\n", y_min, y_max);
- }
- ***************
- *** 1052,1058
- ymin *= 0.9;
- ymax *= 1.1;
- }
- ! fprintf(stderr, "adjusting to [%g:%g]\n", ymin, ymax);
- }
- }
-
-
- --- 1053,1059 -----
- y_min *= 0.9;
- y_max *= 1.1;
- }
- ! fprintf(stderr, "adjusting to [%g:%g]\n", y_min, y_max);
- }
- }
-
- ***************
- *** 1067,1073
- double ticmin, ticmax; /* for checking if tic is almost inrange */
-
- if (end == VERYLARGE) /* for user-def series */
- ! end = max(ymin,ymax);
-
- /* limit to right side of plot */
- end = min(end, max(ymin,ymax));
-
- --- 1068,1074 -----
- double ticmin, ticmax; /* for checking if tic is almost inrange */
-
- if (end == VERYLARGE) /* for user-def series */
- ! end = max(y_min,y_max);
-
- /* limit to right side of plot */
- end = min(end, max(y_min,y_max));
- ***************
- *** 1070,1076
- end = max(ymin,ymax);
-
- /* limit to right side of plot */
- ! end = min(end, max(ymin,ymax));
-
- /* to allow for rounding errors */
- ticmin = min(ymin,ymax) - SIGNIF*incr;
-
- --- 1071,1077 -----
- end = max(y_min,y_max);
-
- /* limit to right side of plot */
- ! end = min(end, max(y_min,y_max));
-
- /* to allow for rounding errors */
- ticmin = min(y_min,y_max) - SIGNIF*incr;
- ***************
- *** 1073,1080
- end = min(end, max(ymin,ymax));
-
- /* to allow for rounding errors */
- ! ticmin = min(ymin,ymax) - SIGNIF*incr;
- ! ticmax = max(ymin,ymax) + SIGNIF*incr;
- end = end + SIGNIF*incr;
-
- for (ticplace = start; ticplace <= end; ticplace +=incr) {
-
- --- 1074,1081 -----
- end = min(end, max(y_min,y_max));
-
- /* to allow for rounding errors */
- ! ticmin = min(y_min,y_max) - SIGNIF*incr;
- ! ticmax = max(y_min,y_max) + SIGNIF*incr;
- end = end + SIGNIF*incr;
-
- for (ticplace = start; ticplace <= end; ticplace +=incr) {
- ***************
- *** 1085,1091
- for (ltic = 2; ltic <= 9; ltic++) {
- lticplace = ticplace+log10((double)ltic);
- if ( inrange(lticplace,ticmin,ticmax) )
- ! ytick(lticplace, (char *)NULL, incr, 0.5);
- }
- }
- }
-
- --- 1086,1092 -----
- for (ltic = 2; ltic <= 9; ltic++) {
- lticplace = ticplace+log10((double)ltic);
- if ( inrange(lticplace,ticmin,ticmax) )
- ! ytick(lticplace, "\0", incr, 0.5);
- }
- }
- }
- ***************
- *** 1091,1097
- }
- }
-
- -
- /* DRAW_XTICS: draw a regular tic series, x axis */
- draw_xtics(start, incr, end)
- double start, incr, end; /* tic series definition */
-
- --- 1092,1097 -----
- }
- }
-
- /* DRAW_XTICS: draw a regular tic series, x axis */
- draw_xtics(start, incr, end)
- double start, incr, end; /* tic series definition */
- ***************
- *** 1103,1109
- double ticmin, ticmax; /* for checking if tic is almost inrange */
-
- if (end == VERYLARGE) /* for user-def series */
- ! end = max(xmin,xmax);
-
- /* limit to right side of plot */
- end = min(end, max(xmin,xmax));
-
- --- 1103,1109 -----
- double ticmin, ticmax; /* for checking if tic is almost inrange */
-
- if (end == VERYLARGE) /* for user-def series */
- ! end = max(x_min,x_max);
-
- /* limit to right side of plot */
- end = min(end, max(x_min,x_max));
- ***************
- *** 1106,1112
- end = max(xmin,xmax);
-
- /* limit to right side of plot */
- ! end = min(end, max(xmin,xmax));
-
- /* to allow for rounding errors */
- ticmin = min(xmin,xmax) - SIGNIF*incr;
-
- --- 1106,1112 -----
- end = max(x_min,x_max);
-
- /* limit to right side of plot */
- ! end = min(end, max(x_min,x_max));
-
- /* to allow for rounding errors */
- ticmin = min(x_min,x_max) - SIGNIF*incr;
- ***************
- *** 1109,1116
- end = min(end, max(xmin,xmax));
-
- /* to allow for rounding errors */
- ! ticmin = min(xmin,xmax) - SIGNIF*incr;
- ! ticmax = max(xmin,xmax) + SIGNIF*incr;
- end = end + SIGNIF*incr;
-
- for (ticplace = start; ticplace <= end; ticplace +=incr) {
-
- --- 1109,1116 -----
- end = min(end, max(x_min,x_max));
-
- /* to allow for rounding errors */
- ! ticmin = min(x_min,x_max) - SIGNIF*incr;
- ! ticmax = max(x_min,x_max) + SIGNIF*incr;
- end = end + SIGNIF*incr;
-
- for (ticplace = start; ticplace <= end; ticplace +=incr) {
- ***************
- *** 1121,1127
- for (ltic = 2; ltic <= 9; ltic++) {
- lticplace = ticplace+log10((double)ltic);
- if ( inrange(lticplace,ticmin,ticmax) )
- ! xtick(lticplace, (char *)NULL, incr, 0.5);
- }
- }
- }
-
- --- 1121,1127 -----
- for (ltic = 2; ltic <= 9; ltic++) {
- lticplace = ticplace+log10((double)ltic);
- if ( inrange(lticplace,ticmin,ticmax) )
- ! xtick(lticplace, "\0", incr, 0.5);
- }
- }
- }
- ***************
- *** 1127,1134
- }
- }
-
- ! /* DRAW_USER_YTICS: draw a user tic series, y axis */
- ! draw_user_ytics(list)
- struct ticmark *list; /* list of tic marks */
- {
- double ticplace;
-
- --- 1127,1189 -----
- }
- }
-
- ! /* DRAW_SERIES_YTICS: draw a user tic series, y axis */
- ! draw_series_ytics(start, incr, end)
- ! double start, incr, end; /* tic series definition */
- ! /* assume start < end, incr > 0 */
- ! {
- ! double ticplace, place;
- ! double ticmin, ticmax; /* for checking if tic is almost inrange */
- ! double spacing = log_y ? log10(incr) : incr;
- !
- ! if (end == VERYLARGE)
- ! end = max(CheckLog(log_y, y_min), CheckLog(log_y, y_max));
- ! else
- ! /* limit to right side of plot */
- ! end = min(end, max(CheckLog(log_y, y_min), CheckLog(log_y, y_max)));
- !
- ! /* to allow for rounding errors */
- ! ticmin = min(y_min,y_max) - SIGNIF*incr;
- ! ticmax = max(y_min,y_max) + SIGNIF*incr;
- ! end = end + SIGNIF*incr;
- !
- ! for (ticplace = start; ticplace <= end; ticplace +=incr) {
- ! place = (log_y ? log10(ticplace) : ticplace);
- ! if ( inrange(place,ticmin,ticmax) )
- ! ytick(place, yformat, spacing, 1.0);
- ! }
- ! }
- !
- !
- ! /* DRAW_SERIES_XTICS: draw a user tic series, x axis */
- ! draw_series_xtics(start, incr, end)
- ! double start, incr, end; /* tic series definition */
- ! /* assume start < end, incr > 0 */
- ! {
- ! double ticplace, place;
- ! double ticmin, ticmax; /* for checking if tic is almost inrange */
- ! double spacing = log_x ? log10(incr) : incr;
- !
- ! if (end == VERYLARGE)
- ! end = max(CheckLog(log_x, x_min), CheckLog(log_x, x_max));
- ! else
- ! /* limit to right side of plot */
- ! end = min(end, max(CheckLog(log_x, x_min), CheckLog(log_x, x_max)));
- !
- ! /* to allow for rounding errors */
- ! ticmin = min(x_min,x_max) - SIGNIF*incr;
- ! ticmax = max(x_min,x_max) + SIGNIF*incr;
- ! end = end + SIGNIF*incr;
- !
- ! for (ticplace = start; ticplace <= end; ticplace +=incr) {
- ! place = (log_x ? log10(ticplace) : ticplace);
- ! if ( inrange(place,ticmin,ticmax) )
- ! xtick(place, xformat, spacing, 1.0);
- ! }
- ! }
- !
- ! /* DRAW_SET_YTICS: draw a user tic set, y axis */
- ! draw_set_ytics(list)
- struct ticmark *list; /* list of tic marks */
- {
- double ticplace;
- ***************
- *** 1132,1139
- struct ticmark *list; /* list of tic marks */
- {
- double ticplace;
- ! double incr = (ymax - ymin) / 10;
- ! /* global xmin, xmax, xscale, ymin, ymax, yscale */
-
- while (list != NULL) {
- ticplace = list->position;
-
- --- 1187,1194 -----
- struct ticmark *list; /* list of tic marks */
- {
- double ticplace;
- ! double incr = (y_max - y_min) / 10;
- ! /* global x_min, x_max, xscale, y_min, y_max, yscale */
-
- while (list != NULL) {
- ticplace = (log_y ? log10(list->position) : list->position);
- ***************
- *** 1136,1145
- /* global xmin, xmax, xscale, ymin, ymax, yscale */
-
- while (list != NULL) {
- ! ticplace = list->position;
- ! if ( inrange(ticplace, ymin, ymax) /* in range */
- ! || NearlyEqual(ticplace, ymin, incr) /* == ymin */
- ! || NearlyEqual(ticplace, ymax, incr)) /* == ymax */
- ytick(ticplace, list->label, incr, 1.0);
-
- list = list->next;
-
- --- 1191,1200 -----
- /* global x_min, x_max, xscale, y_min, y_max, yscale */
-
- while (list != NULL) {
- ! ticplace = (log_y ? log10(list->position) : list->position);
- ! if ( inrange(ticplace, y_min, y_max) /* in range */
- ! || NearlyEqual(ticplace, y_min, incr) /* == y_min */
- ! || NearlyEqual(ticplace, y_max, incr)) /* == y_max */
- ytick(ticplace, list->label, incr, 1.0);
-
- list = list->next;
- ***************
- *** 1146,1153
- }
- }
-
- ! /* DRAW_USER_XTICS: draw a user tic series, x axis */
- ! draw_user_xtics(list)
- struct ticmark *list; /* list of tic marks */
- {
- double ticplace;
-
- --- 1201,1208 -----
- }
- }
-
- ! /* DRAW_SET_XTICS: draw a user tic set, x axis */
- ! draw_set_xtics(list)
- struct ticmark *list; /* list of tic marks */
- {
- double ticplace;
- ***************
- *** 1151,1158
- struct ticmark *list; /* list of tic marks */
- {
- double ticplace;
- ! double incr = (xmax - xmin) / 10;
- ! /* global xmin, xmax, xscale, ymin, ymax, yscale */
-
- while (list != NULL) {
- ticplace = list->position;
-
- --- 1206,1213 -----
- struct ticmark *list; /* list of tic marks */
- {
- double ticplace;
- ! double incr = (x_max - x_min) / 10;
- ! /* global x_min, x_max, xscale, y_min, y_max, yscale */
-
- while (list != NULL) {
- ticplace = (log_x ? log10(list->position) : list->position);
- ***************
- *** 1155,1164
- /* global xmin, xmax, xscale, ymin, ymax, yscale */
-
- while (list != NULL) {
- ! ticplace = list->position;
- ! if ( inrange(ticplace, xmin, xmax) /* in range */
- ! || NearlyEqual(ticplace, xmin, incr) /* == xmin */
- ! || NearlyEqual(ticplace, xmax, incr)) /* == xmax */
- xtick(ticplace, list->label, incr, 1.0);
-
- list = list->next;
-
- --- 1210,1219 -----
- /* global x_min, x_max, xscale, y_min, y_max, yscale */
-
- while (list != NULL) {
- ! ticplace = (log_x ? log10(list->position) : list->position);
- ! if ( inrange(ticplace, x_min, x_max) /* in range */
- ! || NearlyEqual(ticplace, x_min, incr) /* == x_min */
- ! || NearlyEqual(ticplace, x_max, incr)) /* == x_max */
- xtick(ticplace, list->label, incr, 1.0);
-
- list = list->next;
- ***************
- *** 1194,1209
- }
-
- /* label the ticmark */
- ! if (text) {
- ! (void) sprintf(ticlabel, text, CheckLog(log_y, place));
- ! if ((*t->justify_text)(RIGHT)) {
- ! (*t->put_text)(xleft-(t->h_char),
- ! map_y(place), ticlabel);
- ! } else {
- ! (*t->put_text)(xleft-(t->h_char)*(strlen(ticlabel)+1),
- ! map_y(place), ticlabel);
- ! }
- ! }
- }
-
- /* draw and label an x-axis ticmark */
-
- --- 1249,1265 -----
- }
-
- /* label the ticmark */
- ! if (text == NULL)
- ! text = yformat;
- !
- ! (void) sprintf(ticlabel, text, CheckLog(log_y, place));
- ! if ((*t->justify_text)(RIGHT)) {
- ! (*t->put_text)(xleft-(t->h_char),
- ! map_y(place), ticlabel);
- ! } else {
- ! (*t->put_text)(xleft-(t->h_char)*(strlen(ticlabel)+1),
- ! map_y(place), ticlabel);
- ! }
- }
-
- /* draw and label an x-axis ticmark */
- ***************
- *** 1233,1239
- (*t->move)(map_x(place), ybot);
- (*t->vector)(map_x(place), ybot - ticsize);
- }
- !
- /* label the ticmark */
- if (text) {
- (void) sprintf(ticlabel, text, CheckLog(log_x, place));
-
- --- 1289,1295 -----
- (*t->move)(map_x(place), ybot);
- (*t->vector)(map_x(place), ybot - ticsize);
- }
- !
- /* label the ticmark */
- if (text == NULL)
- text = xformat;
- ***************
- *** 1235,1248
- }
-
- /* label the ticmark */
- ! if (text) {
- ! (void) sprintf(ticlabel, text, CheckLog(log_x, place));
- ! if ((*t->justify_text)(CENTRE)) {
- ! (*t->put_text)(map_x(place),
- ! ybot-(t->v_char), ticlabel);
- ! } else {
- ! (*t->put_text)(map_x(place)-(t->h_char)*strlen(ticlabel)/2,
- ! ybot-(t->v_char), ticlabel);
- ! }
- }
- }
-
- --- 1291,1305 -----
- }
-
- /* label the ticmark */
- ! if (text == NULL)
- ! text = xformat;
- !
- ! (void) sprintf(ticlabel, text, CheckLog(log_x, place));
- ! if ((*t->justify_text)(CENTRE)) {
- ! (*t->put_text)(map_x(place),
- ! ybot-(t->v_char), ticlabel);
- ! } else {
- ! (*t->put_text)(map_x(place)-(t->h_char)*strlen(ticlabel)/2,
- ! ybot-(t->v_char), ticlabel);
- }
- }
- diff -cr ./docs/gnuplot.1 ../patch/docs/gnuplot.1
- *** ./docs/gnuplot.1 Tue Mar 27 08:59:42 1990
- --- ../patch/docs/gnuplot.1 Thu Sep 6 09:59:07 1990
- ***************
- *** 1,5
- .\" dummy line
- ! .TH GNUPLOT 1 "13 February 1990"
- .UC 4
- .SH NAME
- gnuplot \- an interactive plotting program
-
- --- 1,5 -----
- .\" dummy line
- ! .TH GNUPLOT 1 "31 August 1990"
- .UC 4
- .SH NAME
- gnuplot \- an interactive plotting program
- ***************
- *** 4,10
- .SH NAME
- gnuplot \- an interactive plotting program
- .SH SYNOPSIS
- ! .B gnuplot file ...
- .br
- .SH DESCRIPTION
- .I Gnuplot
-
- --- 4,11 -----
- .SH NAME
- gnuplot \- an interactive plotting program
- .SH SYNOPSIS
- ! .B gnuplot
- ! [ X11 options ] [file ...]
- .br
- .SH DESCRIPTION
- .I Gnuplot
- ***************
- *** 38,43
- BBN BitGraph,
- Roland DXY800A,
- EEPIC,
- Epson LX-800,
- Fig,
- HP2623,
-
- --- 39,46 -----
- BBN BitGraph,
- Roland DXY800A,
- EEPIC,
- + EmTeX,
- + Epson 60dpi printers,
- Epson LX-800,
- Fig,
- HP2623,
- ***************
- *** 54,59
- QMS QUIC,
- ReGis (VT125 and VT2xx),
- Selanar,
- Tek 401x,
- Vectrix 384,
- and unixplot.
-
- --- 57,64 -----
- QMS QUIC,
- ReGis (VT125 and VT2xx),
- Selanar,
- + Star color printer,
- + Tandy DMP-130 printer,
- Tek 401x,
- Tek 410x,
- Vectrix 384,
- ***************
- *** 55,60
- ReGis (VT125 and VT2xx),
- Selanar,
- Tek 401x,
- Vectrix 384,
- and unixplot.
- The PC version compiled by Microsoft C
-
- --- 60,66 -----
- Star color printer,
- Tandy DMP-130 printer,
- Tek 401x,
- + Tek 410x,
- Vectrix 384,
- Unix PC (ATT 3b1 or ATT 7300)
- unixplot,
- ***************
- *** 56,62
- Selanar,
- Tek 401x,
- Vectrix 384,
- ! and unixplot.
- The PC version compiled by Microsoft C
- supports IBM CGA, EGA, VGA, Hercules, ATT 6300,
- and Corona 325 graphics.
-
- --- 62,70 -----
- Tek 401x,
- Tek 410x,
- Vectrix 384,
- ! Unix PC (ATT 3b1 or ATT 7300)
- ! unixplot,
- ! and X11.
- The PC version compiled by Microsoft C
- supports IBM CGA, EGA, VGA, Hercules, ATT 6300,
- and Corona 325 graphics.
- ***************
- *** 61,67
- supports IBM CGA, EGA, VGA, Hercules, ATT 6300,
- and Corona 325 graphics.
- The PC version compiled by Turbo C
- ! supports IBM CGA, EGA, MCGA, VGA and Hercules graphics.
- Other devices can be added simply, but will require recompiling.
- .PP
- Shell escapes and command line substitution.
-
- --- 69,75 -----
- supports IBM CGA, EGA, VGA, Hercules, ATT 6300,
- and Corona 325 graphics.
- The PC version compiled by Turbo C
- ! supports IBM CGA, EGA, MCGA, VGA, Hercules and ATT 6300 graphics.
- Other devices can be added simply, but will require recompiling.
- .PP
- Shell escapes and command line substitution.
- ***************
- *** 73,78
- All computations performed in the complex domain. Just the real part is
- plotted by default, but functions like imag() and abs() and arg() are
- available to override this.
- .SH AUTHORS
- Thomas Williams, Pixar Corporation,
- .br
-
- --- 81,123 -----
- All computations performed in the complex domain. Just the real part is
- plotted by default, but functions like imag() and abs() and arg() are
- available to override this.
- + .SH X11 OPTIONS
- + .I Gnuplot
- + provides two terminal types (\fIx11\fP and \fIX11\fP) for use
- + with X servers. The \fIX11\fP terminal type provides differing colors as well
- + as shapes for the \fIpoints\fP plotting style. The two types are otherwise
- + identical. When used with either of these terminal types, \fIgnuplot\fP
- + honors all the standard X Toolkit options and resources such as geometry, font,
- + foreground and background. See the X(1) man page for a description of
- + the options. For color or grayscale displays \fIgnuplot\fP also honors
- + the following resources (shown here with default values):
- + .sp
- + .B "gnuplot*textColor: black"
- + .br
- + .B "gnuplot*borderColor: black"
- + .br
- + .B "gnuplot*axisColor: black"
- + .br
- + .B "gnuplot*line1Color: red"
- + .br
- + .B "gnuplot*line2Color: green"
- + .br
- + .B "gnuplot*line3Color: blue"
- + .br
- + .B "gnuplot*line4Color: magenta"
- + .br
- + .B "gnuplot*line5Color: cyan"
- + .br
- + .B "gnuplot*line6Color: sienna"
- + .br
- + .B "gnuplot*line7Color: orange"
- + .br
- + .B "gnuplot*line8Color: coral"
- + .br
- + .PP
- + The size or aspect ratio of a plot may be changed by resizing the
- + .I gnuplot
- + window.
- .SH AUTHORS
- Thomas Williams, Pixar Corporation,
- .br
- ***************
- *** 87,92
- Further additions by David Kotz, Duke University, North Carolina, USA.
- .br
- (dfk@cs.duke.edu)
- .SH BUGS
- The atan() function does not work correctly for complex arguments.
- .br
-
- --- 132,139 -----
- Further additions by David Kotz, Duke University, North Carolina, USA.
- .br
- (dfk@cs.duke.edu)
- + .br
- + X11 support by Ed Kubaitis, University of Illinois, USA.
- .SH BUGS
- The atan() function does not work correctly for complex arguments.
- .br
- ***************
- *** 90,95
- .SH BUGS
- The atan() function does not work correctly for complex arguments.
- .br
- See the
- .I help bugs
- command in gnuplot.
-
- --- 137,144 -----
- .SH BUGS
- The atan() function does not work correctly for complex arguments.
- .br
- + The bessel functions do not work for complex arguments.
- + .br
- See the
- .I help bugs
- command in gnuplot.
- ***************
- *** 95,97
- command in gnuplot.
- .SH SEE ALSO
- See the printed manual or the on-line help for details on specific commands.
-
- --- 144,148 -----
- command in gnuplot.
- .SH SEE ALSO
- See the printed manual or the on-line help for details on specific commands.
- + .br
- + X(1).
- diff -cr ./docs/gnuplot.doc ../patch/docs/gnuplot.doc
- *** ./docs/gnuplot.doc Tue Mar 27 08:59:55 1990
- --- ../patch/docs/gnuplot.doc Wed Sep 12 17:36:14 1990
- ***************
- *** 21,26
- many commands.
-
- For help on any topic, type 'help' followed by the name of the topic.
- 2 clear
- ?clear
- The `clear` command erases the current screen or output device as
-
- --- 21,39 -----
- many commands.
-
- For help on any topic, type 'help' followed by the name of the topic.
- + 2 cd
- + ?cd
- + The `cd` command changes working directory.
- +
- + Syntax:
- + cd <directory-name>
- +
- + The directory name must be enclosed in quotes.
- +
- + Examples:
- +
- + cd 'subdir'
- + cd ".."
- 2 clear
- ?clear
- The `clear` command erases the current screen or output device as
- ***************
- *** 30,36
- ?comments
- Comments are supported as follows: a # may appear in most places in a line
- and GNUPLOT will ignore the rest of the line. It will not have this
- ! affect inside quotes, inside numbers (including complex numbers), inside
- command substitutions, etc. In short, it works anywhere it makes sense
- to work.
- 2 environment
-
- --- 43,49 -----
- ?comments
- Comments are supported as follows: a # may appear in most places in a line
- and GNUPLOT will ignore the rest of the line. It will not have this
- ! effect inside quotes, inside numbers (including complex numbers), inside
- command substitutions, etc. In short, it works anywhere it makes sense
- to work.
- 2 environment
- ***************
- *** 49,56
- On VMS, the symbol GNUPLOT$HELP should be defined as the name of
- the help library for gnuplot.
-
- ! On Unix, HOME is used as the name of a directory to search for a
- ! .gnuplot file if none is found in the current directory.
- On MS-DOS, GNUPLOT is used. On VMS, SYS$LOGIN: is used.
- See help start-up.
-
-
- --- 62,69 -----
- On VMS, the symbol GNUPLOT$HELP should be defined as the name of
- the help library for gnuplot.
-
- ! On Unix, HOME is used as the name of a directory to search for
- ! a .gnuplot file if none is found in the current directory.
- On MS-DOS, GNUPLOT is used. On VMS, SYS$LOGIN: is used.
- See help start-up.
-
- ***************
- *** 653,658
- print <expression>
-
- See `expressions`.
- 2 quit
- ?quit
- The `exit` and `quit` commands and your computer's END-OF-FILE
-
- --- 666,677 -----
- print <expression>
-
- See `expressions`.
- + 2 pwd
- + ?pwd
- + The `pwd` command prints the name of the working directory to the screen.
- +
- + Syntax:
- + pwd
- 2 quit
- ?quit
- The `exit` and `quit` commands and your computer's END-OF-FILE
- ***************
- *** 1400,1405
- ?bugs
- The atan() function does not work correctly for complex arguments.
-
- The most important known bug is actually in the stdio library for the
- Sun4 operating system (SunOS Sys4-3.2). The "%g" format for `printf`
- sometimes incorrectly prints numbers (e.g., 200000.0 as "2"). Thus,
-
- --- 1419,1426 -----
- ?bugs
- The atan() function does not work correctly for complex arguments.
-
- + The bessel functions do not work for complex arguments.
- +
- The most important known bug is actually in the stdio library for the
- Sun4 operating system (SunOS Sys4-3.2). The "%g" format for `printf`
- sometimes incorrectly prints numbers (e.g., 200000.0 as "2"). Thus,
- ***************
- *** 1446,1448
- %g format than release 2.4, but not much. Trailing decimal points are
- now removed, but trailing zeros are still not removed from %g numbers
- in exponential format.
-
- --- 1467,1472 -----
- %g format than release 2.4, but not much. Trailing decimal points are
- now removed, but trailing zeros are still not removed from %g numbers
- in exponential format.
- +
- + Please report any bugs you find to pixar!bug-gnuplot@sun.com or
- + pixar!bug-gnuplot@ucbvax.berkeley.edu.
- Common subdirectories: ./docs/latextut and ../patch/docs/latextut
- diff -cr ./docs/latextut/tutorial.tex ../patch/docs/latextut/tutorial.tex
- *** ./docs/latextut/tutorial.tex Tue Mar 27 09:00:42 1990
- --- ../patch/docs/latextut/tutorial.tex Tue Aug 28 16:17:28 1990
- ***************
- *** 57,62
- and may produce better-looking plots. See Section~\ref{s:eepic} for
- more information.
-
- \section{Using GNUPLOT for \LaTeX: a Tutorial}
-
- GNUPLOT is by nature an interactive program. Users making plots for
-
- --- 57,68 -----
- and may produce better-looking plots. See Section~\ref{s:eepic} for
- more information.
-
- + There is a small package of auxiliary files (makefiles and scripts)
- + that I find useful for making \LaTeX\ plots with GNUPLOT. This is
- + available for \verb+ftp+ as \verb+pub/gnuplot-latex.shar+ from
- + \verb+cs.duke.edu+. I can mail copies (see the end of this paper for
- + information).
- +
- \section{Using GNUPLOT for \LaTeX: a Tutorial}
-
- GNUPLOT is by nature an interactive program. Users making plots for
- ***************
- *** 500,505
- may be changed.
-
- \section{Contact}
- ! Please contact me at dfk@cs.duke.edu with any comments you may have.
-
- \end{document}
-
- --- 506,515 -----
- may be changed.
-
- \section{Contact}
- ! Please contact me at \verb+dfk@cs.duke.edu+ with any comments you may
- ! have on GNUPLOT's \LaTeX\ driver. For general GNUPLOT questions, send
- ! mail to the GNUPLOT mailing list
- ! (\verb+pixar!info-gnuplot@ucbvax.berkeley.edu+).
- !
-
- \end{document}
- diff -c ./translate/command.c ../patch/translate/command.c
- *** ./translate/command.c Tue Mar 27 09:03:58 1990
- --- ../patch/translate/command.c Tue Aug 28 16:07:33 1990
- ***************
- *** 983,989
- err_msg(message);
-
- if (point && line)
- ! return(LINESPOINTS);
- if (point)
- return(POINTS);
- if (line)
-
- --- 983,989 -----
- err_msg(message);
-
- if (point && line)
- ! return((int)LINESPOINTS);
- if (point)
- return((int)POINTS);
- if (line)
- ***************
- *** 985,991
- if (point && line)
- return(LINESPOINTS);
- if (point)
- ! return(POINTS);
- if (line)
- return(LINES);
-
-
- --- 985,991 -----
- if (point && line)
- return((int)LINESPOINTS);
- if (point)
- ! return((int)POINTS);
- if (line)
- return((int)LINES);
-
- ***************
- *** 987,993
- if (point)
- return(POINTS);
- if (line)
- ! return(LINES);
-
- /* should not happen */
- err_msg("no standard style corresponds to this style");
-
- --- 987,993 -----
- if (point)
- return((int)POINTS);
- if (line)
- ! return((int)LINES);
-
- /* should not happen */
- err_msg("no standard style corresponds to this style");
- ***************
- *** 991,997
-
- /* should not happen */
- err_msg("no standard style corresponds to this style");
- ! return(LINES);
- }
-
-
-
- --- 991,997 -----
-
- /* should not happen */
- err_msg("no standard style corresponds to this style");
- ! return((int)LINES);
- }
-
-
-