home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume23 / jgraph / patch06a / patch.6 < prev   
Encoding:
Text File  |  1991-10-22  |  49.9 KB  |  1,864 lines

  1. *** ../work/README    Tue Oct  8 17:36:09 1991
  2. --- README    Tue Oct  8 16:55:20 1991
  3. ***************
  4. *** 1,3 ****
  5. --- 1,5 ----
  6. + $Revision: 6.0 $
  7.   Jgraph takes the description of a graph or graphs in the standard
  8.   input, and produces a postscript file on the standard output.  Jgraph
  9.   is ideal for plotting any mixture of scatter point graphs, line
  10. ***************
  11. *** 8,14 ****
  12.   graphs with a minimum of effort, yet powerful enough to give the user
  13.   the flexibility to tailor the appearance of the graph to his or her
  14.   individual preferences.  This includes plotting multiple graphs and
  15. ! laying them out separately on the page. 
  16.   
  17.   The program is written in C, and shouldn't take anything too fancy
  18.   or machine-dependent.  It has been tested on VAX mipsel's and mipseb's,
  19. --- 10,16 ----
  20.   graphs with a minimum of effort, yet powerful enough to give the user
  21.   the flexibility to tailor the appearance of the graph to his or her
  22.   individual preferences.  This includes plotting multiple graphs and
  23. ! laying them out separately on the page (or pages). 
  24.   
  25.   The program is written in C, and shouldn't take anything too fancy
  26.   or machine-dependent.  It has been tested on VAX mipsel's and mipseb's,
  27. ***************
  28. *** 17,22 ****
  29. --- 19,32 ----
  30.   There is a makefile, a man page (in jgraph.1), source code, and 
  31.   example graphs.
  32.   
  33. + Jgraph is available via anonymous ftp to princeton.edu, in the
  34. + file jgraph.Z.  This file is a compressed shell bundle file.
  35. + There is also a mailing list in which I inform users directly 
  36. + about bug fixes.  This is for those who don't read comp.sources.misc,
  37. + or those who would like to hear about minor bug fixes which I
  38. + haven't posted as a patch to comp.sources.misc.
  39.   Please send me comments and/or bug reports.
  40.   
  41.   Author: Jim Plank
  42. ***************
  43. *** 24,31 ****
  44.   USmail:    Department of Computer Science
  45.       Princeton University
  46.       35 Olden St.
  47. !     Princeton, Nj 08544-2087
  48. !         
  49. !   
  50. --- 34,37 ----
  51.   USmail:    Department of Computer Science
  52.       Princeton University
  53.       35 Olden St.
  54. !     Princeton, NJ 08544-2087
  55. *** ../work/descrip.mms    Tue Oct  8 17:36:10 1991
  56. --- descrip.mms    Tue Oct  8 16:55:13 1991
  57. ***************
  58. *** 1,10 ****
  59. ! CC = cc
  60.   .ifdef DEBUG
  61. ! CFLAGS=/noopt/debug
  62.   LFLAGS=/debug
  63.   .else
  64. ! CFLAGS=
  65.   LFLAGS=
  66.   .endif
  67.   
  68. --- 1,15 ----
  69. ! # VMS MMS makefile
  70. ! #
  71. ! # In the link you will get a warning because of the multiple definition
  72. ! # of exit(). This may be ignored; in order to get MMS completing without
  73. ! # trouble you will have to call MMS as follows:
  74. ! #    $ MMS/IGNORE
  75. ! #
  76.   .ifdef DEBUG
  77. ! CFLAGS=/INCLUDE=(SYS$DISK:[],SYS$SHARE:)/noopt/debug
  78.   LFLAGS=/debug
  79.   .else
  80. ! CFLAGS=/INCLUDE=(SYS$DISK:[],SYS$SHARE:)
  81.   LFLAGS=
  82.   .endif
  83.   
  84. ***************
  85. *** 16,36 ****
  86.           prio_list.obj, \
  87.           process.obj, \
  88.           show.obj, \
  89. !         token.obj
  90.   
  91.   all :    jgraph.exe
  92.       ! done
  93.   
  94. ! .SUFFIXES : .jgr .jps .tex .dvi
  95. ! .jgr.jps :
  96. !     jgraph < $*.jgr > *.jps
  97. ! .tex.dvi :
  98. !     latex $*.tex
  99.   jgraph.exe : $(OBJS)
  100. !     link $(LFLAGS) /exe=jgraph $(OBJS)
  101.   
  102.   ###
  103.   draw.obj :    draw.c jgraph.h list.h prio_list.h
  104. --- 21,37 ----
  105.           prio_list.obj, \
  106.           process.obj, \
  107.           show.obj, \
  108. !         token.obj, \
  109. !         exit.obj
  110.   
  111.   all :    jgraph.exe
  112.       ! done
  113.   
  114. ! # Do not link against the shareable image VAXCRTL.EXE, or you will
  115. ! # miss the reference to the local exit() routine.
  116. ! # EXIT will be reported as being multiply defined - ignore that.
  117.   jgraph.exe : $(OBJS)
  118. !     link $(LFLAGS) /exe=jgraph $(OBJS),sys$library:vaxcrtl/libr
  119.   
  120.   ###
  121.   draw.obj :    draw.c jgraph.h list.h prio_list.h
  122. ***************
  123. *** 42,44 ****
  124. --- 43,46 ----
  125.   process.obj :    process.c jgraph.h list.h prio_list.h
  126.   show.obj :    show.c jgraph.h list.h prio_list.h
  127.   token.obj :    token.c list.h
  128. + exit.obj :    exit.c
  129. *** ../work/draw.c    Tue Oct  8 17:36:11 1991
  130. --- draw.c    Tue Oct  8 16:55:14 1991
  131. ***************
  132. *** 1,7 ****
  133.   /* 
  134.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/draw.c,v $
  135. !  * $Revision: 5.0 $
  136. !  * $Date: 91/05/02 14:45:08 $
  137.    * $Author: jsp $
  138.    */
  139.   
  140. --- 1,7 ----
  141.   /* 
  142.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/draw.c,v $
  143. !  * $Revision: 6.0 $
  144. !  * $Date: 91/10/08 16:53:43 $
  145.    * $Author: jsp $
  146.    */
  147.   
  148. ***************
  149. *** 46,53 ****
  150.   
  151.   #define MAXIMUM(a,b) ((a > b) ? a : b)
  152.   
  153. ! draw_axis(a)
  154. ! Axis a;
  155.   {
  156.     char orientation;
  157.     Hash h;
  158. --- 46,53 ----
  159.   
  160.   #define MAXIMUM(a,b) ((a > b) ? a : b)
  161.   
  162. ! draw_axis(a, other)
  163. ! Axis a, other;
  164.   {
  165.     char orientation;
  166.     Hash h;
  167. ***************
  168. *** 57,70 ****
  169.     setlinewidth(1.0);
  170.     if (a->draw_axis_line) {
  171.       comment("Drawing Axis");
  172.       printline(0.0, a->draw_at, a->psize, a->draw_at, orientation);
  173.     }
  174.     if (a->draw_hash_marks) {
  175.       comment("Drawing Hash Marks");
  176.       for (h = first(a->hash_lines); h != nil(a->hash_lines); h = next(h)) {
  177. !       printline(h->loc, 
  178. !                 a->draw_hash_marks_at, 
  179. !                 h->loc, 
  180.                   a->draw_hash_marks_at + (h->size * a->hash_scale), 
  181.                   orientation);
  182.       }
  183. --- 57,69 ----
  184.     setlinewidth(1.0);
  185.     if (a->draw_axis_line) {
  186.       comment("Drawing Axis");
  187. +     printf("gsave %f setgray\n", a->gray);
  188.       printline(0.0, a->draw_at, a->psize, a->draw_at, orientation);
  189.     }
  190.     if (a->draw_hash_marks) {
  191.       comment("Drawing Hash Marks");
  192.       for (h = first(a->hash_lines); h != nil(a->hash_lines); h = next(h)) {
  193. !       printline(h->loc, a->draw_hash_marks_at, h->loc, 
  194.                   a->draw_hash_marks_at + (h->size * a->hash_scale), 
  195.                   orientation);
  196.       }
  197. ***************
  198. *** 81,90 ****
  199. --- 80,95 ----
  200.         draw_label(a->hl);
  201.       }
  202.     }
  203. +   if (a->grid_lines) {
  204. +     for (h = first(a->hash_lines); h != nil(a->hash_lines); h = next(h)) {
  205. +       printline(h->loc, 0.0, h->loc, other->psize, orientation);
  206. +     }
  207. +   }
  208.     if (a->draw_axis_label) {
  209.       comment("Drawing Axis Label");
  210.       draw_label(a->label);
  211.     }
  212. +   printf("  grestore\n");
  213.   }
  214.   
  215.   
  216. ***************
  217. *** 96,109 ****
  218. --- 101,128 ----
  219.     print_text(l->label, l->x, l->y, l->hj, l->vj, l->rotate, l->font, l->fontsize);
  220.   }
  221.   
  222. + set_clip(g)
  223. + Graph g;
  224. + {
  225. +   comment("Setting Clip");
  226. +   printf("newpath\n");
  227. +   printf(" 0 0 moveto 0 %f lineto %f %f lineto %f 0 lineto\n",
  228. +            g->y_axis->psize, g->x_axis->psize,
  229. +            g->y_axis->psize, g->x_axis->psize);
  230. +   printf("  closepath clip newpath\n");
  231. + }
  232.   draw_curves(g)
  233.   Graph g;
  234.   {
  235.     Curve c;
  236.   
  237. +   printf("gsave\n");
  238. +   if (g->clip) set_clip(g);
  239.     for(c = first(g->curves); c != nil(g->curves); c = next(c)) {
  240.       draw_curve(c, g);
  241.     }
  242. +   printf(" grestore\n");
  243.   }
  244.   
  245.   draw_curve(c, g)
  246. ***************
  247. *** 112,128 ****
  248.   {
  249.     Point p;
  250.     int i;
  251.   
  252.     if (c->linetype != '0') {
  253. -     comment("Drawing Curve Lines");
  254. -     
  255.       i = 0;
  256.       for (p = first(c->pts);
  257.            p != nil(c->pts);
  258.            p = next(p)) {
  259.         if (i == 0) {
  260. !         start_line(ctop(p->x, g->x_axis), ctop(p->y, g->y_axis), 
  261. !                         c->linethick, c->linetype);
  262.         } else {
  263.           cont_line(ctop(p->x, g->x_axis), ctop(p->y, g->y_axis));
  264.         } 
  265. --- 131,148 ----
  266.   {
  267.     Point p;
  268.     int i;
  269. +    float this_x, this_y, last_x, last_y;
  270.   
  271. +   printf("gsave %f setgray\n", c->gray);
  272. +   if (c->clip) set_clip(g);
  273. +   comment("Drawing Curve");
  274.     if (c->linetype != '0') {
  275.       i = 0;
  276.       for (p = first(c->pts);
  277.            p != nil(c->pts);
  278.            p = next(p)) {
  279.         if (i == 0) {
  280. !         start_line(ctop(p->x, g->x_axis), ctop(p->y, g->y_axis), c);
  281.         } else {
  282.           cont_line(ctop(p->x, g->x_axis), ctop(p->y, g->y_axis));
  283.         } 
  284. ***************
  285. *** 138,145 ****
  286.     for (p = first(c->pts);
  287.          p != nil(c->pts);
  288.          p = next(p)) {
  289. !       draw_mark(ctop(p->x, g->x_axis), ctop(p->y, g->y_axis), c, g);
  290.       }
  291.   }
  292.   
  293.   draw_mark(x, y, c, g)
  294. --- 158,176 ----
  295.     for (p = first(c->pts);
  296.          p != nil(c->pts);
  297.          p = next(p)) {
  298. !     this_x = ctop(p->x, g->x_axis);
  299. !     this_y = ctop(p->y, g->y_axis);
  300. !     draw_mark(this_x, this_y, c, g);
  301. !     if (p != first(c->pts)) {
  302. !       if (c->rarrows) 
  303. !         draw_arrow(this_x, this_y, last_x, last_y, c);
  304. !       if (c->larrows) 
  305. !         draw_arrow(last_x, last_y, this_x, this_y, c);
  306.       }
  307. +     last_x = this_x;  
  308. +     last_y = this_y;  
  309. +   }
  310. +   printf("     grestore\n");
  311.   }
  312.   
  313.   draw_mark(x, y, c, g)
  314. ***************
  315. *** 208,213 ****
  316. --- 239,261 ----
  317.     }
  318.   }
  319.   
  320. + draw_arrow(x1, y1, x2, y2, c)
  321. + float x1, y1, x2, y2;
  322. + Curve c;
  323. + {
  324. +   float dx, dy;
  325. +   
  326. +   dx = x1 - x2;
  327. +   dy = y1 - y2;
  328. +   if (dx == 0.0 && dy == 0.0) return;
  329. +   printf("gsave %f %f translate %f %f atan rotate\n", x1, y1, dy, dx);
  330. +   start_poly(0.0, 0.0);
  331. +   cont_poly(-(c->asize[0]), (c->asize[1]));
  332. +   cont_poly(-(c->asize[0]), -(c->asize[1]));
  333. +   end_poly(c->fill);
  334. +   printf("      grestore\n");
  335. + }
  336.   draw_legend(g)
  337.   Graph g;
  338.   {
  339. ***************
  340. *** 220,233 ****
  341.     if (l->type == 'n') return;
  342.     for (c = first(g->curves); c != nil(g->curves); c = next(c)) {
  343.       if (c->l->label != CNULL) {
  344.         y = c->l->y - (c->l->fontsize / 2.0 * FCPI / FPPI);
  345.         if (l->anylines) {
  346. !         if (c->linetype != '0') {
  347.             x = c->l->x - l->midspace - l->linelength;
  348. !           start_line(x, y, c->linethick, c->linetype); 
  349.             cont_line(x+l->linelength, y);
  350.             end_line();
  351.           }
  352.           x = c->l->x - l->midspace - l->linelength / 2.0;
  353.         } else x = c->l->x - l->midspace;
  354.         if (c->marktype == 'X' || c->marktype == 'Y') {
  355. --- 268,284 ----
  356.     if (l->type == 'n') return;
  357.     for (c = first(g->curves); c != nil(g->curves); c = next(c)) {
  358.       if (c->l->label != CNULL) {
  359. +       printf("gsave %f setgray\n", c->gray);
  360.         y = c->l->y - (c->l->fontsize / 2.0 * FCPI / FPPI);
  361.         if (l->anylines) {
  362. !         if (c->linetype != '0' && l->linelength != 0) {
  363.             x = c->l->x - l->midspace - l->linelength;
  364. !           start_line(x, y, c); 
  365.             cont_line(x+l->linelength, y);
  366.             end_line();
  367.           }
  368. +         if (c->larrows) draw_arrow(x, y, x+l->linelength, y, c);
  369. +         if (c->rarrows) draw_arrow(x+l->linelength, y, x, y, c);
  370.           x = c->l->x - l->midspace - l->linelength / 2.0;
  371.         } else x = c->l->x - l->midspace;
  372.         if (c->marktype == 'X' || c->marktype == 'Y') {
  373. ***************
  374. *** 239,244 ****
  375. --- 290,296 ----
  376.         } else {
  377.           draw_mark(x, y, c, g);
  378.         }
  379. +       printf("grestore\n");
  380.         draw_label(c->l);
  381.       }
  382.     }
  383. ***************
  384. *** 260,267 ****
  385.     comment("Drawing New Graph");
  386.     printf("%f %f translate\n", g->x_translate - g->x_axis->psize / 2.0, 
  387.             g->y_translate);
  388. !   draw_axis(g->x_axis);
  389. !   draw_axis(g->y_axis);
  390.     draw_label(g->title);
  391.     draw_curves(g);
  392.     draw_legend(g);
  393. --- 312,325 ----
  394.     comment("Drawing New Graph");
  395.     printf("%f %f translate\n", g->x_translate - g->x_axis->psize / 2.0, 
  396.             g->y_translate);
  397. !   if (g->border) {
  398. !     printline(0.0, 0.0, 0.0, g->y_axis->psize, 'x');
  399. !     printline(0.0, 0.0, 0.0, g->x_axis->psize, 'y');
  400. !     printline(g->x_axis->psize, 0.0, g->x_axis->psize, g->y_axis->psize, 'x');
  401. !     printline(g->y_axis->psize, 0.0, g->y_axis->psize, g->x_axis->psize, 'y');
  402. !   }
  403. !   draw_axis(g->x_axis, g->y_axis);
  404. !   draw_axis(g->y_axis, g->x_axis);
  405.     draw_label(g->title);
  406.     draw_curves(g);
  407.     draw_legend(g);
  408. ***************
  409. *** 271,292 ****
  410.   
  411.   }
  412.   
  413. ! draw_graphs(gs)
  414.   Graphs gs;
  415.   {
  416.     Graph g;
  417.   
  418. !   draw_header(gs);
  419. !   for (g = first(gs->g); g != nil(gs->g); g = next(g)) {
  420. !     draw_graph(g);
  421.     }
  422. -   draw_footer(gs);
  423.   }
  424.   
  425. ! draw_header(gs)
  426.   Graphs gs;
  427.   {
  428. !   printf("%%!\n");
  429.     printf("%%%%Pages: 0\n");
  430.     printf("%%%%BoundingBox: %f %f %f %f\n", gs->bb[0], gs->bb[1], gs->bb[2], gs->bb[3]);
  431.     printf("%%%%EndComments\n");
  432. --- 329,355 ----
  433.   
  434.   }
  435.   
  436. ! draw_graphs(gs, pp)
  437.   Graphs gs;
  438. + int pp;
  439.   {
  440. +   Graphs gs_p;
  441.     Graph g;
  442.   
  443. !   for (gs_p = first(gs); gs_p != nil(gs); gs_p = next(gs_p)) {
  444. !     draw_header(gs_p, pp);
  445. !     for (g = first(gs_p->g); g != nil(gs_p->g); g = next(g)) {
  446. !       draw_graph(g);
  447. !     }
  448. !     draw_footer(gs_p, pp);
  449.     }
  450.   }
  451.   
  452. ! draw_header(gs, pp)
  453.   Graphs gs;
  454. + int pp;
  455.   {
  456. !   printf("%%!PS-Adobe-2.0 EPSF-1.2\n");
  457.     printf("%%%%Pages: 0\n");
  458.     printf("%%%%BoundingBox: %f %f %f %f\n", gs->bb[0], gs->bb[1], gs->bb[2], gs->bb[3]);
  459.     printf("%%%%EndComments\n");
  460. ***************
  461. *** 301,307 ****
  462.     printf("{$F2psEnteredState restore end} def\t%%%%EndProlog\n");
  463.     printf("$F2psBegin\n");
  464.     printf("%f 0 translate\n", gs->width / 2.0);
  465. !   if (gs->printable_postscript)
  466.       printf("%f %f translate\n",
  467.         ((8.5 * FCPI) - (gs->bb[2] - gs->bb[0])) / 2.0,     
  468.         (gs->bb[3] > (5.5*FCPI)) ? (11*FCPI) - gs->bb[3] : (5.5*FCPI));
  469. --- 364,370 ----
  470.     printf("{$F2psEnteredState restore end} def\t%%%%EndProlog\n");
  471.     printf("$F2psBegin\n");
  472.     printf("%f 0 translate\n", gs->width / 2.0);
  473. !   if (pp)
  474.       printf("%f %f translate\n",
  475.         ((8.5 * FCPI) - (gs->bb[2] - gs->bb[0])) / 2.0,     
  476.         (gs->bb[3] > (5.5*FCPI)) ? (11*FCPI) - gs->bb[3] : (5.5*FCPI));
  477. ***************
  478. *** 309,317 ****
  479.     printf("0.700 setlinewidth\n");
  480.   }
  481.   
  482. ! draw_footer(gs)
  483.   Graphs gs;
  484.   {
  485.     printf("$F2psEnd\n");
  486. !   if (gs->printable_postscript) printf("showpage\n");
  487.   }
  488. --- 372,381 ----
  489.     printf("0.700 setlinewidth\n");
  490.   }
  491.   
  492. ! draw_footer(gs, pp)
  493.   Graphs gs;
  494. + int pp;
  495.   {
  496.     printf("$F2psEnd\n");
  497. !   if (pp) printf("showpage\n");
  498.   }
  499. *** ../work/edit.c    Tue Oct  8 17:36:13 1991
  500. --- edit.c    Tue Oct  8 16:55:14 1991
  501. ***************
  502. *** 1,7 ****
  503.   /* 
  504.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/edit.c,v $
  505. !  * $Revision: 5.0 $
  506. !  * $Date: 91/05/02 14:45:11 $
  507.    * $Author: jsp $
  508.    */
  509.   
  510. --- 1,7 ----
  511.   /* 
  512.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/edit.c,v $
  513. !  * $Revision: 6.0 $
  514. !  * $Date: 91/10/08 16:53:44 $
  515.    * $Author: jsp $
  516.    */
  517.   
  518. ***************
  519. *** 92,97 ****
  520. --- 92,99 ----
  521.     a1->auto_hash_marks = a2->auto_hash_marks;
  522.     a1->minor_hashes = a2->minor_hashes;
  523.     a1->hash_scale = a2->hash_scale;
  524. +   a1->gray = a2->gray;
  525. +   a1->grid_lines = a2->grid_lines;
  526.     a1->precision = a2->precision;
  527.     a1->start_given = a2->start_given;
  528.     a1->is_lg = a2->is_lg;
  529. ***************
  530. *** 111,116 ****
  531. --- 113,120 ----
  532.     copy_axis(g->y_axis, prev(g)->y_axis);
  533.     g->x_translate = prev(g)->x_translate;
  534.     g->y_translate = prev(g)->y_translate;
  535. +   g->clip = prev(g)->clip;
  536. +   g->border = prev(g)->border;
  537.   }
  538.   
  539.   edit_curve(c, g)
  540. ***************
  541. *** 120,125 ****
  542. --- 124,130 ----
  543.     char inp_str[256];
  544.     float x, y, f;
  545.     Point p;
  546. +   Flist fl;
  547.     int i;
  548.   
  549.     while ( getstring(inp_str) ) {
  550. ***************
  551. *** 182,187 ****
  552. --- 187,199 ----
  553.           fprintf(stderr, "\n");
  554.           exit(1);
  555.         } else c->marktype = MARKTYPES[i];
  556. +     } else if (strcmp(inp_str, "glines") == 0) {
  557. +       while (getfloat(&f)) {
  558. +         fl = (Flist) get_node (c->gen_linetype);
  559. +         fl->f = f;
  560. +         insert(fl, c->gen_linetype);
  561. +       } 
  562. +       rejecttoken();
  563.       } else if (strcmp(inp_str, "linetype") == 0) {
  564.         if (!getstring(inp_str)) return;
  565.         if (strcmp(inp_str, "none") == 0) c->linetype = '0';
  566. ***************
  567. *** 188,201 ****
  568.         else if (strcmp(inp_str, "solid") == 0) c->linetype = 's';
  569.         else if (strcmp(inp_str, "dotted") == 0) c->linetype = '.';
  570.         else if (strcmp(inp_str, "dashed") == 0) c->linetype = '-';
  571.         else {
  572.           error_header(); fprintf(stderr, "Bad line type: %s\n", inp_str);
  573. !         error_header(); fprintf(stderr, "             Valid marks are %s.\n", 
  574. !           "solid, dottted, dashed, none");
  575.           exit(1);
  576.         }
  577.       } else if (strcmp(inp_str, "linethickness") == 0) {
  578.         if (!getfloat(&f)) rejecttoken(); else c->linethick = f;
  579.       } else {
  580.         rejecttoken();
  581.         return;
  582. --- 200,241 ----
  583.         else if (strcmp(inp_str, "solid") == 0) c->linetype = 's';
  584.         else if (strcmp(inp_str, "dotted") == 0) c->linetype = '.';
  585.         else if (strcmp(inp_str, "dashed") == 0) c->linetype = '-';
  586. +       else if (strcmp(inp_str, "longdash") == 0) c->linetype = 'l';
  587. +       else if (strcmp(inp_str, "dotdash") == 0) c->linetype = 'd';
  588. +       else if (strcmp(inp_str, "dotdotdash") == 0) c->linetype = 'D';
  589. +       else if (strcmp(inp_str, "dotdotdashdash") == 0) c->linetype = '2';
  590. +       else if (strcmp(inp_str, "general") == 0) c->linetype = 'g';
  591.         else {
  592.           error_header(); fprintf(stderr, "Bad line type: %s\n", inp_str);
  593. !         error_header(); fprintf(stderr, "             Valid marks are %s\n", 
  594. !           "solid, dotted, dashed, longdash, dotdash,"); 
  595. !         error_header(); fprintf(stderr, "             %s.\n", 
  596. !           "dotdotdash, dotdotdashdash, none");
  597.           exit(1);
  598.         }
  599.       } else if (strcmp(inp_str, "linethickness") == 0) {
  600.         if (!getfloat(&f)) rejecttoken(); else c->linethick = f;
  601. +     } else if (strcmp(inp_str, "gray") == 0) {
  602. +       if (!getfloat(&f)) rejecttoken(); else c->gray = f;
  603. +     } else if (strcmp(inp_str, "larrows") == 0) {
  604. +       c->larrows = 1;
  605. +     } else if (strcmp(inp_str, "nolarrows") == 0) {
  606. +       c->larrows = 0;
  607. +     } else if (strcmp(inp_str, "rarrows") == 0) {
  608. +       c->rarrows = 1;
  609. +     } else if (strcmp(inp_str, "norarrows") == 0) {
  610. +       c->rarrows = 0;
  611. +     } else if (strcmp(inp_str, "asize") == 0) {
  612. +       if (!getfloat(&f)) rejecttoken(); 
  613. +       else {
  614. +         c->asize[0] = f;
  615. +         if (!getfloat(&f)) rejecttoken(); 
  616. +         else c->asize[1] = f;
  617. +       }
  618. +     } else if (strcmp(inp_str, "clip") == 0) {
  619. +       c->clip = 1;
  620. +     } else if (strcmp(inp_str, "noclip") == 0) {
  621. +       c->clip = 0;
  622.       } else {
  623.         rejecttoken();
  624.         return;
  625. ***************
  626. *** 336,341 ****
  627. --- 376,387 ----
  628.         a->draw_axis_label = 0;
  629.       } else if (strcmp(inp_str, "draw_axis_label") == 0) {
  630.         a->draw_axis_label = 1;
  631. +     } else if (strcmp(inp_str, "no_grid_lines") == 0) {
  632. +       a->grid_lines = 0;
  633. +     } else if (strcmp(inp_str, "grid_lines") == 0) {
  634. +       a->grid_lines = 1;
  635. +     } else if (strcmp(inp_str, "gray") == 0) {
  636. +       if ( getfloat(&f)) a->gray = f; else rejecttoken();
  637.       } else {
  638.         rejecttoken(); 
  639.         return;
  640. ***************
  641. *** 427,432 ****
  642. --- 473,486 ----
  643.         if (!getfloat(&f)) rejecttoken(); else gs->height = f;
  644.       } else if (strcmp(inp_str, "X") == 0) {
  645.         if (!getfloat(&f)) rejecttoken(); else gs->width = f;
  646. +     } else if (strcmp(inp_str, "border") == 0) {
  647. +       g->border = 1;
  648. +     } else if (strcmp(inp_str, "noborder") == 0) {
  649. +       g->border = 0;
  650. +     } else if (strcmp(inp_str, "clip") == 0) {
  651. +       g->clip = 1;
  652. +     } else if (strcmp(inp_str, "noclip") == 0) {
  653. +       g->clip = 0;
  654.       } else {
  655.         rejecttoken();
  656.         return;
  657. ***************
  658. *** 437,446 ****
  659.   edit_graphs(gs)
  660.   Graphs gs;
  661.   {
  662.     char inp_str[80];
  663.     float f;
  664. !   int num;
  665.   
  666.     while ( getstring(inp_str) ) {
  667.       if (strcmp(inp_str, "graph") == 0) {
  668.         if (!getint(&num)) {
  669. --- 491,502 ----
  670.   edit_graphs(gs)
  671.   Graphs gs;
  672.   {
  673. +   Graphs the_g;
  674.     char inp_str[80];
  675.     float f;
  676. !   int num, i;
  677.   
  678. +   the_g = first(gs);
  679.     while ( getstring(inp_str) ) {
  680.       if (strcmp(inp_str, "graph") == 0) {
  681.         if (!getint(&num)) {
  682. ***************
  683. *** 447,461 ****
  684.           error_header(); fprintf(stderr, "\"graph\" not followed by number\n");
  685.           exit(1);
  686.         }
  687. !       edit_graph(get_graph(gs->g, num), gs);
  688.       } else if (strcmp(inp_str, "newgraph") == 0) {
  689. !       if (first(gs->g) == nil(gs->g))
  690. !         edit_graph(new_graph(gs->g, 0), gs);
  691. !       else edit_graph(new_graph(gs->g, last(gs->g)->num + 1), gs);
  692.       } else if (strcmp(inp_str, "Y") == 0) {
  693. !       if (!getfloat(&f)) rejecttoken(); else gs->height = f;
  694.       } else if (strcmp(inp_str, "X") == 0) {
  695. !       if (!getfloat(&f)) rejecttoken(); else gs->width = f;
  696.       } else {
  697.         error_header(); fprintf(stderr, "Bad token: %s\n", inp_str);
  698.         exit(1);
  699. --- 503,530 ----
  700.           error_header(); fprintf(stderr, "\"graph\" not followed by number\n");
  701.           exit(1);
  702.         }
  703. !       edit_graph(get_graph(the_g->g, num), the_g);
  704.       } else if (strcmp(inp_str, "newgraph") == 0) {
  705. !       if (first(the_g->g) == nil(the_g->g))
  706. !         edit_graph(new_graph(the_g->g, 0), the_g);
  707. !       else edit_graph(new_graph(the_g->g, last(the_g->g)->num + 1), the_g);
  708.       } else if (strcmp(inp_str, "Y") == 0) {
  709. !       if (!getfloat(&f)) rejecttoken(); else the_g->height = f;
  710.       } else if (strcmp(inp_str, "X") == 0) {
  711. !       if (!getfloat(&f)) rejecttoken(); else the_g->width = f;
  712. !     } else if (strcmp(inp_str, "newpage") == 0) {
  713. !       new_graphs(gs);
  714. !       the_g = last(gs);
  715. !     } else if (strcmp(inp_str, "bbox") == 0) {
  716. !       for (i = 0; i < 4; i++) {
  717. !         if (!getfloat(&f)) {
  718. !           error_header();
  719. !           fprintf("Bbox definition must have four numbers\n");
  720. !           exit(1);
  721. !         } else {
  722. !           the_g->bb[i] = f;
  723. !         }
  724. !       }
  725.       } else {
  726.         error_header(); fprintf(stderr, "Bad token: %s\n", inp_str);
  727.         exit(1);
  728. *** /dev/null    Tue Oct  8 02:00:06 1991
  729. --- exit.c    Tue Oct  8 16:55:14 1991
  730. ***************
  731. *** 0 ****
  732. --- 1,49 ----
  733. + /*
  734. + **++
  735. + **  FUNCTIONAL DESCRIPTION:
  736. + **
  737. + **      Exit is a VMS replacement for the standard Unix exit function
  738. + **
  739. + **  FORMAL PARAMETERS:
  740. + **
  741. + **      error_code    integer passed by value (optional)
  742. + **
  743. + **  SIDE EFFECTS:
  744. + **
  745. + **      Exit will never return to calling program
  746. + **    VMS exit status ($STATUS) will be set
  747. + **--
  748. + **/
  749. + #include <varargs.h>
  750. + exit(va_alist)
  751. + va_dcl
  752. + {
  753. +     int        nargs;
  754. +     va_list        va;
  755. +     int        exit_code = 0;
  756. +     /*
  757. +      * Pick up the argument, if present
  758. +      */
  759. +     va_count(nargs);
  760. +     va_start(va);
  761. +     if (nargs > 0) exit_code = va_arg(va,int);
  762. +     /*
  763. +      * Set the VMS $STATUS to the appropriate value:
  764. +      *    if exit_code == 0 then $STATUS := success
  765. +      *    if exit_code >  0 then $STATUS := error
  766. +      *    if exit_code <  0 then $STATUS := severe_error
  767. +      * and perform exit.
  768. +      *
  769. +      * Note:
  770. +      *    the %X10000000 added to the actual success/error indicator
  771. +      *    will prevent DCL from printing a message.
  772. +      *    A 'on error' will be obeyed however.
  773. +      */
  774. +     if (exit_code == 0)        /* success    */
  775. +         sys$exit(0x10000001);
  776. +     else if (exit_code > 0)        /* error    */
  777. +         sys$exit(0x10000002);
  778. +     else                /* severe error    */
  779. +         sys$exit(0x10000004);
  780. + }
  781. *** ../work/jgraph.1    Tue Oct  8 17:36:18 1991
  782. --- jgraph.1    Tue Oct  8 16:55:19 1991
  783. ***************
  784. *** 20,52 ****
  785.   graphs with a minimum of effort, yet powerful enough to give the user
  786.   the flexibility to tailor the appearance of the graph to his or her
  787.   individual preferences.  This includes plotting multiple graphs and
  788. ! laying them out separately on the page.
  789.   .sp
  790.   As an example, if the user wanted to simply plot the points (2,3),
  791.   (4,5), (1,6), the following would be enough of a specification file:
  792. ! .EX
  793. ! newgraph
  794. ! newcurve pts 2 3 4 5 1 6
  795. ! .EE
  796.   Now, if the user wanted to spruce the graph up by adding labels to
  797.   the axes, connecting the points, and titling the graph, then the
  798.   input could change to:
  799. ! .EX
  800. ! newgraph
  801. ! newcurve pts 2 3 4 5 1 6 linetype solid
  802. ! xaxis label : X axis
  803. ! yaxis label : Y axis
  804. ! title : This is an example graph
  805. ! .EE
  806.   If the user instead wanted this to be a bar graph with different
  807.   endpoints on the axes, he/she could simply change the input to:
  808. ! .EX
  809. ! newgraph
  810. ! xaxis min 0 max 5 label : X axis
  811. ! yaxis min 0 max 6 label : Y axis
  812. ! newcurve pts 2 3 4 5 1 6 marktype xbar
  813. ! title : This is an example bar graph
  814. ! .EE
  815.   There are many more features of the description language, which are
  816.   described below in the next section.  Features which are not embedded
  817.   within the description language are: line and function interpolation,
  818. --- 20,58 ----
  819.   graphs with a minimum of effort, yet powerful enough to give the user
  820.   the flexibility to tailor the appearance of the graph to his or her
  821.   individual preferences.  This includes plotting multiple graphs and
  822. ! laying them out separately on the page (or pages).
  823.   .sp
  824.   As an example, if the user wanted to simply plot the points (2,3),
  825.   (4,5), (1,6), the following would be enough of a specification file:
  826. ! .PP
  827. ! .nf
  828. !     newgraph
  829. !     newcurve pts 2 3 4 5 1 6
  830. ! .fi
  831. ! .PP
  832.   Now, if the user wanted to spruce the graph up by adding labels to
  833.   the axes, connecting the points, and titling the graph, then the
  834.   input could change to:
  835. ! .PP
  836. ! .nf
  837. !     newgraph
  838. !     newcurve pts 2 3 4 5 1 6 linetype solid
  839. !     xaxis label : X axis
  840. !     yaxis label : Y axis
  841. !     title : This is an example graph
  842. ! .fi
  843. ! .PP
  844.   If the user instead wanted this to be a bar graph with different
  845.   endpoints on the axes, he/she could simply change the input to:
  846. ! .PP
  847. ! .nf
  848. !     newgraph
  849. !     xaxis min 0 max 5 label : X axis
  850. !     yaxis min 0 max 6 label : Y axis
  851. !     newcurve pts 2 3 4 5 1 6 marktype xbar
  852. !     title : This is an example bar graph
  853. ! .fi
  854. ! .PP
  855.   There are many more features of the description language, which are
  856.   described below in the next section.  Features which are not embedded
  857.   within the description language are: line and function interpolation,
  858. ***************
  859. *** 110,129 ****
  860.   character after the ``:'' starts the string, and the next newline
  861.   character terminates it.  Notice that in strings white-space is not
  862.   ignored.  Thus, the string ``Graph #1'' can be denoted as:
  863. ! .EX
  864. ! : Graph #1<newline>
  865. ! .EE
  866.   or
  867. ! .EX
  868. ! :<newline>
  869. ! Graph #1<newline>
  870. ! .EE
  871.   This way of denoting strings allows the user to embed leading and
  872.   trailing spaces, as well as the null string.  For example, the
  873.   null string ``'' is represented by:
  874. ! .EX
  875. ! : <newline>
  876. ! .EE
  877.   Once a string has been started, it may contain any character besides
  878.   a newline.  Specifically, it may contain the sequence ``(*'' or
  879.   ``include'' without starting a comment or including a file.
  880. --- 116,139 ----
  881.   character after the ``:'' starts the string, and the next newline
  882.   character terminates it.  Notice that in strings white-space is not
  883.   ignored.  Thus, the string ``Graph #1'' can be denoted as:
  884. ! .nf
  885. !     : Graph #1<newline>
  886.   or
  887. !     :<newline>
  888. !     Graph #1<newline>
  889. ! .fi
  890.   This way of denoting strings allows the user to embed leading and
  891.   trailing spaces, as well as the null string.  For example, the
  892.   null string ``'' is represented by:
  893. ! .nf
  894. !     : <newline>
  895. ! .fi
  896.   Once a string has been started, it may contain any character besides
  897.   a newline.  Specifically, it may contain the sequence ``(*'' or
  898.   ``include'' without starting a comment or including a file.
  899. ***************
  900. *** 204,209 ****
  901. --- 214,249 ----
  902.   and
  903.   \fBX\fR
  904.   respectively.
  905. + .TP
  906. + .B newpage
  907. + This command is for plotting graphs on multiple pages.  After a 
  908. + \fBnewpage,\fR
  909. + the graphs that the user enters will be plotted on a new page.
  910. + New graphs and strings will be numbered starting with 0.  
  911. + Essentially, 
  912. + \fBnewpage\fR
  913. + is the same as appending together the output of separate calls of
  914. + jgraph on the text before the 
  915. + \fBnewpage,\fR
  916. + and on the text after the 
  917. + \fBnewpage.\fR
  918. + \fBNewpage\fR
  919. + will most likely produce bizarre results if the
  920. + \fB\-P\fR
  921. + option is not specified.
  922. + .TP
  923. + \fBbbox \fIfloat\fB \fIfloat\fB \fIfloat\fB \fIfloat\fB\fR
  924. + Jgraph calculates a bounding box for the graph and
  925. + includes it in the header of the postscript output.
  926. + For the purposed of LaTeX, this is usually ok, as LaTeX doesn't
  927. + clip outside of the bounding box.  Unfortunately, other programs
  928. + do clip, and sometimes jgraph doesn't calculate the bounding box
  929. + too well (text especially screws things up).  This command lets
  930. + the user add his/her own bounding box.  The units of this are
  931. + final postscript units.  It's probably best to use the -p option
  932. + to see what the bounding box is that jgraph produces, and then
  933. + alter that accordingly with
  934. + \fBbbox\fR.
  935.   .PD
  936.   .RE
  937.   .LP
  938. ***************
  939. *** 263,272 ****
  940.   is to
  941.   \fBnewcurve.\fR
  942.   .TP
  943.   \fBinherit_axes\fR   
  944.   This lets the user ``inherit'' the values of the last
  945.   graph's axes.  It copies all the attributes of the previous graph's x
  946. ! and y axes, as well as the x_translate and y_translate values. 
  947.   (Actually, this is a little bit of a lie, as it does not copy the
  948.   values of the 
  949.   \fB\fIhash_at\fB, \fImhash_at\fB,\fR
  950. --- 303,336 ----
  951.   is to
  952.   \fBnewcurve.\fR
  953.   .TP
  954. + \fBborder\fR
  955. + .br
  956. + .ns
  957. + .TP
  958. + \fBnoborder\fR
  959. + \fBBorder\fR   
  960. + draws a square border around the area defined by the axes.
  961. + \fBNoborder\fR
  962. + specifies no border.
  963. + \fBNoborder\fR
  964. + is the default.  
  965. + .TP
  966. + \fBclip\fR
  967. + .br
  968. + .ns
  969. + .TP
  970. + \fBnoclip\fR
  971. + \fBClip\fR   
  972. + specifies that all curves in the graph will be clipped -- that is,
  973. + no points outside of the of axes will be plotted.  Clipping can also be
  974. + specified on a per-curve basis.  The default is
  975. + \fBnoclip\fR.
  976. + .TP
  977.   \fBinherit_axes\fR   
  978.   This lets the user ``inherit'' the values of the last
  979.   graph's axes.  It copies all the attributes of the previous graph's x
  980. ! and y axes, as well as the x_translate and y_translate values, and the
  981. ! clipping. 
  982.   (Actually, this is a little bit of a lie, as it does not copy the
  983.   values of the 
  984.   \fB\fIhash_at\fB, \fImhash_at\fB,\fR
  985. ***************
  986. *** 446,451 ****
  987. --- 510,525 ----
  988.   \fBdraw_hash_marks,\fR
  989.   and 
  990.   \fBdraw_hash_labels.\fR
  991. + .TP
  992. + \fBgrid_lines\fR
  993. + .br
  994. + .ns
  995. + .TP
  996. + \fBno_grid_lines\fR
  997. + \fBGrid_lines\fR
  998. + specifies to plot a grid line at each (major and minor) hash
  999. + mark on this axis.  The default is 
  1000. + \fBno_grid_lines\fR.
  1001.   .PD
  1002.   .RE
  1003.   .LP
  1004. ***************
  1005. *** 490,509 ****
  1006.   option of
  1007.   \fBjgraph\fR
  1008.   .TP
  1009.   \fBfill \|[\fIfloat\fB\|]\fR   
  1010.   This sets the filling of marks which define an area
  1011.   to fill (e.g.  ``box'', ``circle'', ``xbar'').  1.0 fills the mark with
  1012.   white.  0.0 fills it with black.  Anything in between is differing
  1013.   levels of gray.  Anything negative fills it with nothing (i.e.  makes
  1014. ! it see-through).  The default fill can be determined using the 
  1015. ! \fB\-p\fR
  1016. ! option of 
  1017. ! \fBjgraph.\fR
  1018.   .TP
  1019.   \fBgmarks \|[\|{\fIfloat\fB\|} \|{\fIfloat\fB\|}\|]*\fR   
  1020.   \fBGmarks\fR
  1021. ! is a way for the user to
  1022. ! define custom marks.  For each mark on 
  1023.   \fB(x,y),\fR 
  1024.   Each pair of 
  1025.   \fB\|{\fIfloat_x\fB\|}, \|{\fIfloat_y\fB\|}, \fR
  1026. --- 564,584 ----
  1027.   option of
  1028.   \fBjgraph\fR
  1029.   .TP
  1030. + \fBgray \|[\fIfloat\fB\|]\fR   
  1031. + This specifies the gray scale in which to draw the curve (i.e. the
  1032. + curve's marks, lines, and arrows).  0.0 (The default) is black.
  1033. + 1.0 is white.
  1034. + .TP
  1035.   \fBfill \|[\fIfloat\fB\|]\fR   
  1036.   This sets the filling of marks which define an area
  1037.   to fill (e.g.  ``box'', ``circle'', ``xbar'').  1.0 fills the mark with
  1038.   white.  0.0 fills it with black.  Anything in between is differing
  1039.   levels of gray.  Anything negative fills it with nothing (i.e.  makes
  1040. ! it see-through).  The default is 0 (black).
  1041.   .TP
  1042.   \fBgmarks \|[\|{\fIfloat\fB\|} \|{\fIfloat\fB\|}\|]*\fR   
  1043.   \fBGmarks\fR
  1044. ! is a way for the user to define custom marks.  For each mark on 
  1045.   \fB(x,y),\fR 
  1046.   Each pair of 
  1047.   \fB\|{\fIfloat_x\fB\|}, \|{\fIfloat_y\fB\|}, \fR
  1048. ***************
  1049. *** 512,529 ****
  1050.     Thus, for example, the
  1051.   ``box'' mark could be defined as ``\fIgmarks\fB -1 -1 -1 1 1 1 1 -1''.
  1052.   .TP
  1053.   \fBlinetype \|[\fItoken\fB\|]\fR   
  1054. ! This defines the type of the line connecting
  1055. ! the points.  Valid entries are ``solid'', ``dotted'', ``dashed'', and
  1056. ! ``none''.  The default is ``none''.  Points are connected in the order in
  1057. ! which they are inserted using the 
  1058.   \fBpts\fR
  1059.   command.
  1060.   .TP
  1061.   \fBlinethickness \|[\fIfloat\fB\|]\fR   
  1062.   This defines the line thickness (in
  1063.   absolute postscript units) of the connecting line.  Default = 1.0.
  1064.   .TP
  1065.   \fBlabel\fR   
  1066.   This edits the label of this curve for the purposed of
  1067.   drawing a legend.  (see LABEL EDITING COMMANDS and LEGEND EDITING
  1068. --- 587,664 ----
  1069.     Thus, for example, the
  1070.   ``box'' mark could be defined as ``\fIgmarks\fB -1 -1 -1 1 1 1 1 -1''.
  1071.   .TP
  1072. + \fBlarrows\fR
  1073. + .br
  1074. + .ns
  1075. + .TP
  1076. + \fBrarrows\fR
  1077. + .br
  1078. + .ns
  1079. + .TP
  1080. + \fBnolarrows\fR
  1081. + .br
  1082. + .ns
  1083. + .TP
  1084. + \fBnorarrows\fR
  1085. + \fBRarrows\fR 
  1086. + specifies to draw an arrow at the end of every line
  1087. + segment in the curve.  
  1088. + \fBLarrows\fR 
  1089. + specifies to draw an arrow at the beginning of every line segment.
  1090. + The size of the arrows can be changed by using
  1091. + \fBasize\fR.
  1092. + The 
  1093. + \fBfill\fR
  1094. + token controls the filling of the head of the arrows.
  1095. + The default is
  1096. + \fBnolarrows\fR
  1097. + and
  1098. + \fBnorarrows\fR.
  1099. + .TP
  1100. + \fBasize \|[\fIfloat\fB\|] \|[\fIfloat\fB\|]\fR   
  1101. + This sets the size of the arrows.  The first 
  1102. + \fB\|[\fIfloat\fB\|] \fR
  1103. + controls the arrow's width.  Its units are those of the x-axis.
  1104. + The second
  1105. + \fB\|[\fIfloat\fB\|] \fR
  1106. + controls the arrow's height.  It is in the units of the y-axis.
  1107. + Use the -p option of jgraph to see the default values.
  1108. + .TP
  1109.   \fBlinetype \|[\fItoken\fB\|]\fR   
  1110. ! This defines the type of the line connecting the points.  Valid
  1111. ! entries are ``solid'', ``dotted'', ``dashed'', ``longdash'',
  1112. ! ``dotdash'', ``dotdotdash'', ``dotdotdashdash'', ``general'', and
  1113. ! ``none''.  The default is ``none''.  ``General'' lets the user define
  1114. ! his own linetype using the
  1115. ! \fBglines\fR
  1116. ! command described below.  Points are connected in the
  1117. ! order in which they are inserted using the 
  1118.   \fBpts\fR
  1119.   command.
  1120.   .TP
  1121. + \fBglines \|[\fIfloat\fB\|]*\fR   
  1122. + This lets the user specify the exact dashing of a line.  The format
  1123. + is as in postscript -- the first number is the length of the first
  1124. + dash, the second is the length of the space after the first dash,
  1125. + etc.  For example, ``dotdash'' could be defined as ``\fIglines\fB 5 3
  1126. + 1 3''.  
  1127. + .TP
  1128.   \fBlinethickness \|[\fIfloat\fB\|]\fR   
  1129.   This defines the line thickness (in
  1130.   absolute postscript units) of the connecting line.  Default = 1.0.
  1131.   .TP
  1132. + \fBclip\fR
  1133. + This specifies that this curve will be clipped -- that is,
  1134. + no points outside of the of axes will be plotted.  
  1135. + .TP
  1136. + \fBnoclip\fR
  1137. + This turns off clipping.  If clipping was specified for the 
  1138. + entire graph, then 
  1139. + \fBnoclip\fR
  1140. + has no effect.
  1141. + \fBNoclip\fR
  1142. + is the default.
  1143. + .TP
  1144.   \fBlabel\fR   
  1145.   This edits the label of this curve for the purposed of
  1146.   drawing a legend.  (see LABEL EDITING COMMANDS and LEGEND EDITING
  1147. ***************
  1148. *** 694,699 ****
  1149. --- 829,839 ----
  1150.   marks, labels, axes, etc.
  1151.   .RS
  1152.   .TP
  1153. + \fBgray \|[\fIfloat\fB\|]\fR   
  1154. + This specifies a gray-scale for drawing the axes (axis lines, hash
  1155. + marks, hash labels and grid lines).  The default is 0.0 (black). 
  1156. + 1.0 is white.
  1157. + .TP
  1158.   \fBhash_at \|[\fIfloat\fB\|]\fR   
  1159.   Draw a hash mark at this point.  No label is
  1160.   made for this hash mark.
  1161. ***************
  1162. *** 928,934 ****
  1163.   .SH EMBEDDING THE OUTPUT IN LATEX
  1164.   I haven't read the manuals, but the way I've been loading these files
  1165.   into LaTeX has been as follows:
  1166. ! .EX
  1167.   1.  Toward the beginning of my LaTeX file, I've had ``\\input{psfig}''
  1168.   2.  Where I've wanted my file, I've put:
  1169.   
  1170. --- 1068,1075 ----
  1171.   .SH EMBEDDING THE OUTPUT IN LATEX
  1172.   I haven't read the manuals, but the way I've been loading these files
  1173.   into LaTeX has been as follows:
  1174. ! .PP
  1175. ! .nf
  1176.   1.  Toward the beginning of my LaTeX file, I've had ``\\input{psfig}''
  1177.   2.  Where I've wanted my file, I've put:
  1178.   
  1179. ***************
  1180. *** 943,949 ****
  1181.   4.  If that doesn't work, try dvips-ing the file and printing the postscript,
  1182.       and if that still doesn't work, try doing everything on a sun.
  1183.   
  1184. ! .EE
  1185.   .SH BUGS
  1186.   If the 
  1187.   \fBhash_scale \fR
  1188. --- 1084,1091 ----
  1189.   4.  If that doesn't work, try dvips-ing the file and printing the postscript,
  1190.       and if that still doesn't work, try doing everything on a sun.
  1191.   
  1192. ! .fi
  1193. ! .PP
  1194.   .SH BUGS
  1195.   If the 
  1196.   \fBhash_scale \fR
  1197. ***************
  1198. *** 953,957 ****
  1199. --- 1095,1106 ----
  1200.   .sp
  1201.   Logarithmic axes cannot contain points <= 0.  If I have 
  1202.   enough complaints to convince me that this is a bug, I'll try to fix it.
  1203. + .sp
  1204. + If jgraph were really smart, then it would have arrow-heads go to the
  1205. + edge of standard marks like circles, etc.  Someday.
  1206. + .sp
  1207. + There is no real way to make the axes such that they decrease from 
  1208. + left to right or low to high -- or at least not without writing your
  1209. + own hash labels.  
  1210.   .sp
  1211.   There may well be loads of other bugs.  Send to jsp@princeton.edu.
  1212. *** ../work/jgraph.c    Tue Oct  8 17:36:20 1991
  1213. --- jgraph.c    Tue Oct  8 16:55:15 1991
  1214. ***************
  1215. *** 1,7 ****
  1216.   /* 
  1217.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/jgraph.c,v $
  1218. !  * $Revision: 5.0 $
  1219. !  * $Date: 91/05/02 14:45:13 $
  1220.    * $Author: jsp $
  1221.    */
  1222.   
  1223. --- 1,7 ----
  1224.   /* 
  1225.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/jgraph.c,v $
  1226. !  * $Revision: 6.0 $
  1227. !  * $Date: 91/10/08 16:53:48 $
  1228.    * $Author: jsp $
  1229.    */
  1230.   
  1231. ***************
  1232. *** 47,54 ****
  1233. --- 47,57 ----
  1234.     new_c = (Curve) get_node(c);
  1235.     new_c->num = num;
  1236.     new_c->l = new_label();
  1237. +   new_c->clip = 0;
  1238. +   new_c->gray = 0.0;
  1239.     
  1240.     new_c->pts = (Point) make_list(sizeof(struct point));
  1241. +   new_c->gen_linetype = (Flist) make_list(sizeof(struct flist));
  1242.     new_c->marktype = MARKTYPES[num % NORMALMARKTYPES];
  1243.     new_c->linetype = '0';
  1244.     new_c->linethick = 1.0;
  1245. ***************
  1246. *** 56,64 ****
  1247.     new_c->marksize[1] = FSIG;
  1248.     new_c->general_marks = (Point) make_list(sizeof(struct point));
  1249.     i = num / NORMALMARKTYPES;
  1250. !   if (i == 0) new_c->fill = 0.0;
  1251. !   else if (i == 1) new_c->fill = 1.0;
  1252. !   else new_c->fill = -1.0;
  1253.     prio_insert(new_c, c, 0);
  1254.     return new_c;
  1255.   }
  1256. --- 59,69 ----
  1257.     new_c->marksize[1] = FSIG;
  1258.     new_c->general_marks = (Point) make_list(sizeof(struct point));
  1259.     i = num / NORMALMARKTYPES;
  1260. !   new_c->fill = 0.0;
  1261. !   new_c->rarrows = 0;
  1262. !   new_c->larrows = 0;
  1263. !   new_c->asize[0] = FSIG;
  1264. !   new_c->asize[1] = FSIG;
  1265.     prio_insert(new_c, c, 0);
  1266.     return new_c;
  1267.   }
  1268. ***************
  1269. *** 113,118 ****
  1270. --- 118,125 ----
  1271.     a->auto_hash_marks = 1;
  1272.     a->start_given = 0;
  1273.     a->hash_scale = -1.0;
  1274. +   a->grid_lines = 0;
  1275. +   a->gray = 0.0;
  1276.     a->is_x = is_x;
  1277.     a->is_lg = 0;
  1278.     a->hash_labels = (String) make_list (sizeof(struct string));
  1279. ***************
  1280. *** 206,211 ****
  1281. --- 213,220 ----
  1282.     g->curves = (Curve) make_list(sizeof(struct curve));
  1283.     g->strings = (String) make_list(sizeof(struct string));
  1284.     g->title = new_title();
  1285. +   g->clip = 0;
  1286. +   g->border = 0;
  1287.     g->legend = new_legend();
  1288.   /*  g->def = new_default(); */
  1289.     prio_insert(g, gs, 0);
  1290. ***************
  1291. *** 222,250 ****
  1292.     return new_g;
  1293.   }
  1294.   
  1295.   main(argc, argv)
  1296.   int argc;
  1297.   char **argv;
  1298.   {
  1299. !   struct graphs gs;
  1300.     int i;
  1301. !   char show;
  1302.   
  1303.   #ifdef VMS 
  1304.     IOSTREAM = stdin;    /* for token.c -hdd */
  1305.   #endif
  1306.     show = 0;
  1307. !   gs.g = (Graph) make_list(sizeof(struct graph));
  1308. !   gs.height = 0.0;
  1309. !   gs.width = 0.0;        /* added -hdd */
  1310. !   gs.printable_postscript = 0;
  1311. !   edit_graphs(&gs);
  1312. !   process_graphs(&gs);
  1313.     for (i = 1; i < argc; i++) {
  1314.       if (strcmp(argv[i], "-p") == 0) show = 1;
  1315. !     else if (strcmp(argv[i], "-P") == 0) gs.printable_postscript = 1;
  1316.     }
  1317. !   if (show) show_graphs(&gs); else draw_graphs(&gs);
  1318.   }
  1319.   
  1320.   
  1321. --- 231,273 ----
  1322.     return new_g;
  1323.   }
  1324.   
  1325. + new_graphs(gs)
  1326. + Graphs gs;
  1327. + {
  1328. +   Graphs newg;
  1329. +   newg = (Graphs) get_node(gs);
  1330. +   newg->g = (Graph) make_list(sizeof(struct graph));
  1331. +   newg->height = 0.0;
  1332. +   newg->width = 0.0;
  1333. +   newg->bb[0] = FSIG; newg->bb[1] = FSIG;
  1334. +   newg->bb[2] = FSIG; newg->bb[3] = FSIG;
  1335. +   insert(newg, gs);
  1336. + }
  1337.   main(argc, argv)
  1338.   int argc;
  1339.   char **argv;
  1340.   {
  1341. !   Graphs gs;
  1342.     int i;
  1343. !   int show, pp;
  1344.   
  1345.   #ifdef VMS 
  1346.     IOSTREAM = stdin;    /* for token.c -hdd */
  1347.   #endif
  1348.     show = 0;
  1349. !   pp = 0;
  1350.     for (i = 1; i < argc; i++) {
  1351.       if (strcmp(argv[i], "-p") == 0) show = 1;
  1352. !     else if (strcmp(argv[i], "-P") == 0) pp = 1;
  1353.     }
  1354. !   gs = (Graphs) make_list(sizeof(struct graphs));
  1355. !   new_graphs(gs, pp);
  1356. !   edit_graphs(gs);
  1357. !   process_graphs(gs);
  1358. !   if (show) show_graphs(gs); else draw_graphs(gs, pp);
  1359. !   exit(0);
  1360.   }
  1361.   
  1362.   
  1363. *** /dev/null    Tue Oct  8 02:00:06 1991
  1364. --- jgraph.com    Tue Oct  8 16:55:15 1991
  1365. ***************
  1366. *** 0 ****
  1367. --- 1,39 ----
  1368. + $!  JGRAPH.COM: Execute jgraph on VMS.
  1369. + $   SAVE_VER = 'F$VERIFY( F$TRNLNM( "JGRAPH_VERIFY"))'
  1370. + $ ! How to use this procedure:
  1371. + $ ! (1) define a symbol to execute the command file
  1372. + $ !      $ JGRAPH :== @dev:[directory]JGRAPH.COM
  1373. + $ !     We will assume that both this jgraph.com and jgraph.exe reside
  1374. + $ !     in dev:[directory].
  1375. + $ ! (2) Then, to run the program with say the HYPERCUBE.JGR file,
  1376. + $ !      $ JGRAPH HYPERCUBE      ! (Yes you can leave off the .JGR extension)
  1377. + $ !     To generate a stand-alone PostScript file that can be sent directly
  1378. + $ !    to the printer, use:
  1379. + $ !      $ JGRAPH HYPERCUBE "-P"
  1380. + $ !    or simply
  1381. + $ !      $ JGRAPH HYPERCUBE -P
  1382. + $ !     If you really want lowercase to reprint input in expanded form:
  1383. + $ !      $ JGRAPH HYPERCUBE "-p"
  1384. + $ !    The resulting output file will have a ".jps" extension.
  1385. + $!
  1386. + $   ON   ERROR   THEN GOTO EXIT
  1387. + $   ON CONTROL_Y THEN GOTO EXIT
  1388. + $!
  1389. + $L1:
  1390. + $   P1 = F$SEARCH( F$PARSE( P1, ".JGR"))
  1391. + $   IF P1 .NES. "" THEN GOTO L2
  1392. + $   INQUIRE /LOCAL P1 "Input File : "
  1393. + $   GOTO L1
  1394. + $L2:
  1395. + $   JPS_FILE  = F$PARSE( P1,,, "NAME") + ".JPS"
  1396. + $   THIS_FILE = F$ENVIRONMENT("PROCEDURE")
  1397. + $   HERE = F$PARSE(THIS_FILE,,,"DEVICE",) + F$PARSE(THIS_FILE,,,"DIRECTORY",)
  1398. + $   RUN_JGRAPH := $'HERE'JGRAPH
  1399. + $!
  1400. + $   TMP = F$VERIFY( 1)
  1401. + $   RUN_JGRAPH <'p1' >'jps_file' "''P2'"
  1402. + $   $status = $STATUS
  1403. + $   TMP = 'F$VERIFY( TMP)
  1404. + $!
  1405. + $EXIT:
  1406. + $   EXIT $status + 0*F$VERIFY( SAVE_VER)
  1407. *** ../work/jgraph.h    Tue Oct  8 17:36:21 1991
  1408. --- jgraph.h    Tue Oct  8 16:55:15 1991
  1409. ***************
  1410. *** 1,7 ****
  1411.   /* 
  1412.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/jgraph.h,v $
  1413. !  * $Revision: 5.0 $
  1414. !  * $Date: 91/05/02 14:46:24 $
  1415.    * $Author: jsp $
  1416.    */
  1417.   
  1418. --- 1,7 ----
  1419.   /* 
  1420.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/jgraph.h,v $
  1421. !  * $Revision: 6.0 $
  1422. !  * $Date: 91/10/08 16:53:50 $
  1423.    * $Author: jsp $
  1424.    */
  1425.   
  1426. ***************
  1427. *** 28,33 ****
  1428. --- 28,39 ----
  1429.     float y;
  1430.   } *Point;
  1431.   
  1432. + typedef struct flist {
  1433. +   struct flist *flink;
  1434. +   struct flist *blink;
  1435. +   float f;
  1436. + } *Flist;
  1437.   typedef struct label {
  1438.     char *label;
  1439.     float x;
  1440. ***************
  1441. *** 48,56 ****
  1442. --- 54,68 ----
  1443.     Point general_marks;
  1444.     float marksize[2];
  1445.     float fill;
  1446. +   float gray;
  1447.     float linethick;
  1448. +   Flist gen_linetype;
  1449.     char marktype;
  1450.     char linetype;
  1451. +   int rarrows;
  1452. +   int larrows;
  1453. +   float asize[2];
  1454. +   int clip;
  1455.   } *Curve;
  1456.   
  1457.   typedef struct string {
  1458. ***************
  1459. *** 99,104 ****
  1460. --- 111,118 ----
  1461.     float draw_hash_marks_at;
  1462.     float draw_hash_labels_at;
  1463.     float draw_at;
  1464. +   float gray;
  1465. +   int grid_lines;
  1466.     int draw_hash_labels;
  1467.     int draw_axis_line;
  1468.     int draw_hash_marks;
  1469. ***************
  1470. *** 121,127 ****
  1471.     float size;
  1472.     int anylines;
  1473.     float midspace;
  1474. !   char type; /* 'n' = off, 't' = top, 'r' = right, 'u' = userdefined, 'c' = custom */
  1475.   } *Legend;
  1476.   
  1477.   typedef struct graph {
  1478. --- 135,142 ----
  1479.     float size;
  1480.     int anylines;
  1481.     float midspace;
  1482. !   char type; /* 'n' = off, 't' = top, 'r' = right, 
  1483. !                 'u' = userdefined, 'c' = custom */
  1484.   } *Legend;
  1485.   
  1486.   typedef struct graph {
  1487. ***************
  1488. *** 137,151 ****
  1489.     Legend legend;
  1490.     String strings;
  1491.     Label title;
  1492.     Default def;
  1493.   } *Graph;
  1494.   
  1495.   typedef struct graphs {
  1496.     Graph g;
  1497.     float height;
  1498.     float width;
  1499.     float bb[4]; /* Bounding box */
  1500. -   char printable_postscript;
  1501.   } *Graphs;
  1502.   
  1503.   extern float ctop();
  1504. --- 152,169 ----
  1505.     Legend legend;
  1506.     String strings;
  1507.     Label title;
  1508. +   int clip;
  1509. +   int border;
  1510.     Default def;
  1511.   } *Graph;
  1512.   
  1513.   typedef struct graphs {
  1514. +   struct graphs *flink;
  1515. +   struct graphs *blink;
  1516.     Graph g;
  1517.     float height;
  1518.     float width;
  1519.     float bb[4]; /* Bounding box */
  1520.   } *Graphs;
  1521.   
  1522.   extern float ctop();
  1523. *** ../work/list.c    Tue Oct  8 17:36:22 1991
  1524. --- list.c    Tue Oct  8 16:55:16 1991
  1525. ***************
  1526. *** 1,7 ****
  1527.   /* 
  1528.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/list.c,v $
  1529. !  * $Revision: 5.0 $
  1530. !  * $Date: 91/05/02 14:45:14 $
  1531.    * $Author: jsp $
  1532.    */
  1533.   
  1534. --- 1,7 ----
  1535.   /* 
  1536.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/list.c,v $
  1537. !  * $Revision: 6.0 $
  1538. !  * $Date: 91/10/08 16:53:51 $
  1539.    * $Author: jsp $
  1540.    */
  1541.   
  1542. *** ../work/list.h    Tue Oct  8 17:36:23 1991
  1543. --- list.h    Tue Oct  8 16:55:16 1991
  1544. ***************
  1545. *** 1,7 ****
  1546.   /* 
  1547.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/list.h,v $
  1548. !  * $Revision: 5.0 $
  1549. !  * $Date: 91/05/02 14:46:26 $
  1550.    * $Author: jsp $
  1551.    */
  1552.   
  1553. --- 1,7 ----
  1554.   /* 
  1555.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/list.h,v $
  1556. !  * $Revision: 6.0 $
  1557. !  * $Date: 91/10/08 16:53:52 $
  1558.    * $Author: jsp $
  1559.    */
  1560.   
  1561. *** ../work/printline.c    Tue Oct  8 17:36:25 1991
  1562. --- printline.c    Tue Oct  8 16:55:16 1991
  1563. ***************
  1564. *** 1,7 ****
  1565.   /* 
  1566.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/printline.c,v $
  1567. !  * $Revision: 5.0 $
  1568. !  * $Date: 91/05/02 14:45:15 $
  1569.    * $Author: jsp $
  1570.    */
  1571.   
  1572. --- 1,7 ----
  1573.   /* 
  1574.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/printline.c,v $
  1575. !  * $Revision: 6.0 $
  1576. !  * $Date: 91/10/08 16:53:54 $
  1577.    * $Author: jsp $
  1578.    */
  1579.   
  1580. ***************
  1581. *** 21,32 ****
  1582.       printf("newpath %f %f moveto %f %f lineto stroke\nstroke\n",
  1583.             y1, x1, y2, x2);} 
  1584.   
  1585. ! start_line(x1, y1, thickness, style)
  1586. ! float x1, y1, thickness;
  1587. ! char style;
  1588.   {
  1589. !   setlinewidth(thickness);
  1590. !   setlinestyle(style);
  1591.     printf("%f %f moveto ", x1, y1);
  1592.   }
  1593.   
  1594. --- 21,32 ----
  1595.       printf("newpath %f %f moveto %f %f lineto stroke\nstroke\n",
  1596.             y1, x1, y2, x2);} 
  1597.   
  1598. ! start_line(x1, y1, c)
  1599. ! float x1, y1;
  1600. ! Curve c;
  1601.   {
  1602. !   setlinewidth(c->linethick);
  1603. !   setlinestyle(c->linetype, c->gen_linetype);
  1604.     printf("%f %f moveto ", x1, y1);
  1605.   }
  1606.   
  1607. ***************
  1608. *** 40,46 ****
  1609.   {
  1610.     printf("stroke\n stroke\n");
  1611.     setlinewidth(1.0);
  1612. !   setlinestyle('s');
  1613.   
  1614.   }
  1615.   
  1616. --- 40,46 ----
  1617.   {
  1618.     printf("stroke\n stroke\n");
  1619.     setlinewidth(1.0);
  1620. !   setlinestyle('s', (Flist) 0);
  1621.   
  1622.   }
  1623.   
  1624. ***************
  1625. *** 129,142 ****
  1626.     printf("%f setlinewidth\n", size * LINEWIDTHFACTOR);
  1627.   }
  1628.   
  1629. ! setlinestyle(style)
  1630.   char style;
  1631.   {
  1632.     switch(style) {
  1633.       case '0': 
  1634.       case 's': printf("\t[] 0 setdash\n"); break;
  1635.       case '.': printf("\t [1 3.200000] 0 setdash\n"); break;
  1636.       case '-': printf("\t [4.00000] 0 setdash\n"); break;
  1637.       default: fprintf(stderr, "Error: Unknown line type: %c\n", style);
  1638.                exit(1);
  1639.                break;
  1640. --- 129,155 ----
  1641.     printf("%f setlinewidth\n", size * LINEWIDTHFACTOR);
  1642.   }
  1643.   
  1644. ! setlinestyle(style, glist)
  1645.   char style;
  1646. + Flist glist;
  1647.   {
  1648. +   Flist fl;
  1649.     switch(style) {
  1650.       case '0': 
  1651.       case 's': printf("\t[] 0 setdash\n"); break;
  1652.       case '.': printf("\t [1 3.200000] 0 setdash\n"); break;
  1653.       case '-': printf("\t [4.00000] 0 setdash\n"); break;
  1654. +     case 'l': printf("\t [7 2] 0 setdash\n"); break;
  1655. +     case 'd': printf("\t [5 3 1 3] 0 setdash\n"); break;
  1656. +     case 'D': printf("\t [5 3 1 2 1 3] 0 setdash\n"); break;
  1657. +     case '2': printf("\t [5 3 5 3 1 2 1 3] 0 setdash\n"); break;
  1658. +     case 'g': 
  1659. +       printf("\t [");
  1660. +       for (fl = first(glist); fl != nil(glist); fl = next(fl))
  1661. +         printf("%f ", fl->f);
  1662. +       printf("] 0 setdash\n");
  1663. +       break;
  1664.       default: fprintf(stderr, "Error: Unknown line type: %c\n", style);
  1665.                exit(1);
  1666.                break;
  1667. *** ../work/prio_list.c    Tue Oct  8 17:36:26 1991
  1668. --- prio_list.c    Tue Oct  8 16:55:16 1991
  1669. ***************
  1670. *** 1,7 ****
  1671.   /* 
  1672.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/prio_list.c,v $
  1673. !  * $Revision: 5.0 $
  1674. !  * $Date: 91/05/02 14:45:17 $
  1675.    * $Author: jsp $
  1676.    */
  1677.   
  1678. --- 1,7 ----
  1679.   /* 
  1680.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/prio_list.c,v $
  1681. !  * $Revision: 6.0 $
  1682. !  * $Date: 91/10/08 16:53:55 $
  1683.    * $Author: jsp $
  1684.    */
  1685.   
  1686. *** ../work/prio_list.h    Tue Oct  8 17:36:27 1991
  1687. --- prio_list.h    Tue Oct  8 16:55:17 1991
  1688. ***************
  1689. *** 1,7 ****
  1690.   /* 
  1691.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/prio_list.h,v $
  1692. !  * $Revision: 5.0 $
  1693. !  * $Date: 91/05/02 14:46:27 $
  1694.    * $Author: jsp $
  1695.    */
  1696.   
  1697. --- 1,7 ----
  1698.   /* 
  1699.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/prio_list.h,v $
  1700. !  * $Revision: 6.0 $
  1701. !  * $Date: 91/10/08 16:53:56 $
  1702.    * $Author: jsp $
  1703.    */
  1704.   
  1705. *** ../work/process.c    Tue Oct  8 17:36:28 1991
  1706. --- process.c    Tue Oct  8 16:55:17 1991
  1707. ***************
  1708. *** 1,7 ****
  1709.   /* 
  1710.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/process.c,v $
  1711. !  * $Revision: 5.0 $
  1712. !  * $Date: 91/05/02 14:45:18 $
  1713.    * $Author: jsp $
  1714.    */
  1715.   
  1716. --- 1,7 ----
  1717.   /* 
  1718.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/process.c,v $
  1719. !  * $Revision: 6.0 $
  1720. !  * $Date: 91/10/08 16:53:56 $
  1721.    * $Author: jsp $
  1722.    */
  1723.   
  1724. ***************
  1725. *** 141,177 ****
  1726.   Axis a;
  1727.   {
  1728.     int i, b, b2, done;
  1729. !   float x, x2;
  1730.   
  1731. !   x2 = 0.0;
  1732.     b = 0;
  1733.     x = a->hash_interval;
  1734.   
  1735.     done = 0;
  1736.     while(b < 6 && !done) {
  1737. !     i = (int) ((x - x2));
  1738.       x2 = i;
  1739. !     if (x2 - x < .0000001 && x - x2 < .0000001) done = 1;
  1740.       else {
  1741.         b++;
  1742. -       x2 *= 10.0;
  1743.         x *= 10.0;
  1744.       }
  1745.     }
  1746.   
  1747. !   x2 = 0.0;
  1748.     b2 = 0;
  1749.     x = a->hash_start;
  1750.   
  1751.     done = 0;
  1752.     while(b2 < 6 && !done) {
  1753. !     i = (int) (x - x2);
  1754.       x2 = i;
  1755. !     if (x2 - x < .0000001 && x - x2 < .0000001) done = 1;
  1756.       else {
  1757.         b2++;
  1758. -       x2 *= 10.0;
  1759.         x *= 10.0;
  1760.       }
  1761.     }
  1762.     return MAX(b, b2);
  1763. --- 141,177 ----
  1764.   Axis a;
  1765.   {
  1766.     int i, b, b2, done;
  1767. !   float x, x2, tolerance;
  1768.   
  1769. !   tolerance = 0.000001;
  1770.     b = 0;
  1771.     x = a->hash_interval;
  1772.   
  1773.     done = 0;
  1774.     while(b < 6 && !done) {
  1775. !     i = (int) (x + 0.4);
  1776.       x2 = i;
  1777. !     if (x2 - x < tolerance && x - x2 < tolerance) done = 1;
  1778.       else {
  1779.         b++;
  1780.         x *= 10.0;
  1781. +       tolerance *= 10.0;
  1782.       }
  1783.     }
  1784.   
  1785. !   tolerance = 0.000001;
  1786.     b2 = 0;
  1787.     x = a->hash_start;
  1788.   
  1789.     done = 0;
  1790.     while(b2 < 6 && !done) {
  1791. !     i = (int) (x + 0.4);
  1792.       x2 = i;
  1793. !     if (x2 - x < tolerance && x - x2 < tolerance) done = 1;
  1794.       else {
  1795.         b2++;
  1796.         x *= 10.0;
  1797. +       tolerance *= 10.0;
  1798.       }
  1799.     }
  1800.     return MAX(b, b2);
  1801. ***************
  1802. *** 323,330 ****
  1803.               if (ABS(t1) >= 1.0 || t1 == 0.0) prec = 0;
  1804.               else {
  1805.                 tmp = ABS(t1);
  1806. !               prec = 2;
  1807. !               while(tmp < 0.0) {tmp *= 10.0; prec++;}
  1808.               }
  1809.             }
  1810.             sprintf(s->s->label, "%.*f", prec, t1);
  1811. --- 323,330 ----
  1812.               if (ABS(t1) >= 1.0 || t1 == 0.0) prec = 0;
  1813.               else {
  1814.                 tmp = ABS(t1);
  1815. !               prec = -1;
  1816. !               while(tmp < 1.0) {tmp *= 10.0; prec++;}
  1817.               }
  1818.             }
  1819.             sprintf(s->s->label, "%.*f", prec, t1);
  1820. ***************
  1821. *** 441,446 ****
  1822. --- 441,450 ----
  1823.                      4.0 : disttop(c->marksize[0], g->x_axis);
  1824.     c->marksize[1] = (c->marksize[1] == FSIG) ? 
  1825.                      4.0 : disttop(c->marksize[1], g->y_axis);
  1826. +   c->asize[0] = (c->asize[0] == FSIG) ? 
  1827. +                    6.0 : disttop(c->asize[0], g->x_axis);
  1828. +   c->asize[1] = (c->asize[1] == FSIG) ? 
  1829. +                    2.0 : disttop(c->asize[1], g->y_axis);
  1830.   }
  1831.   
  1832.   process_curves(g)
  1833. ***************
  1834. *** 470,495 ****
  1835.   process_graphs(gs)
  1836.   Graphs gs;
  1837.   {
  1838.     Graph g;
  1839.     float tmp_x, x, max_y, min_y;
  1840.   
  1841. !   for (g = first(gs->g); g != nil(gs->g); g = next(g)) process_graph(g);
  1842.