home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume28 / jgraph / patch07.2 < prev    next >
Text File  |  1992-02-03  |  12KB  |  464 lines

  1. Newsgroups: comp.sources.misc
  2. From: jsp@Princeton.EDU (James Plank)
  3. Subject:  v28i008:  jgraph - A filter for plotting postscript graphs, Patch07.2
  4. Message-ID: <1992Feb2.033333.25217@sparky.imd.sterling.com>
  5. X-Md4-Signature: 95fd5155def2cc8c8a57dad9dcc00e4c
  6. Date: Sun, 2 Feb 1992 03:33:33 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: jsp@Princeton.EDU (James Plank)
  10. Posting-number: Volume 28, Issue 8
  11. Archive-name: jgraph/patch07.2
  12. Environment: UNIX, VMS, postscript
  13. Patch-To: jgraph: Volume 16, Issue 20
  14.  
  15. Jgraph Patch 7.2: Mon Jan 27 13:22:05 EST 1992
  16.  
  17. There was another layout/bounding box bug -- Thanks to Kevin Thompson
  18. for pointing it out -- it cropped up most visibly when there were 
  19. negative x_translate values.  Anyway, check out the man page entries 
  20. for X, Y, bbox, x_translate and y_translate -- they should give a better
  21. clue about bboxes & centering.
  22.  
  23. Again let me know if there are more bugs -- thanks for your patience.
  24.  
  25. Jim
  26.  
  27. Patch from 7.1:  (as usual, the new version is in princeton.edu:pub/jgraph.Z)
  28.  
  29. *** /dev/null    Mon Jan 27 13:00:42 1992
  30. --- MSDOS.help    Mon Jan 27 13:00:29 1992
  31. ***************
  32. *** 0 ****
  33. --- 1,11 ----
  34. + This from Alan S. Raskin:
  35. + You may be interested in knowing what it takes to get jgraph to compile
  36. + MS-DOS/MS-QuickC:
  37. + 1) Ignore all of the "function should return a value" warnings.  :-)
  38. + 2) Use the blank VMS templates for popen and pclose in token.c
  39. + 3) Define float=double to avoid math-overflow run-time errors.
  40. + -Alan
  41. *** ../work/README    Mon Jan 27 13:19:24 1992
  42. --- README    Mon Jan 27 13:00:30 1992
  43. ***************
  44. *** 1,4 ****
  45. ! $Revision: 7.1 $
  46.   
  47.   Jgraph takes the description of a graph or graphs in the standard
  48.   input, and produces a postscript file on the standard output.  Jgraph
  49. --- 1,4 ----
  50. ! $Revision: 7.2 $
  51.   
  52.   Jgraph takes the description of a graph or graphs in the standard
  53.   input, and produces a postscript file on the standard output.  Jgraph
  54. *** ../work/draw.c    Mon Jan 27 13:19:27 1992
  55. --- draw.c    Mon Jan 27 13:00:31 1992
  56. ***************
  57. *** 1,7 ****
  58.   /* 
  59.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/draw.c,v $
  60. !  * $Revision: 7.1 $
  61. !  * $Date: 92/01/23 15:57:48 $
  62.    * $Author: jsp $
  63.    */
  64.   
  65. --- 1,7 ----
  66.   /* 
  67.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/draw.c,v $
  68. !  * $Revision: 7.2 $
  69. !  * $Date: 92/01/27 12:55:44 $
  70.    * $Author: jsp $
  71.    */
  72.   
  73. ***************
  74. *** 370,377 ****
  75.   Graph g;
  76.   {
  77.     comment("Drawing New Graph");
  78. !   printf("%f %f translate\n", g->x_translate - g->x_axis->psize / 2.0, 
  79. !           g->y_translate);
  80.     if (g->border) {
  81.       printline(0.0, 0.0, 0.0, g->y_axis->psize, 'x');
  82.       printline(0.0, 0.0, 0.0, g->x_axis->psize, 'y');
  83. --- 370,378 ----
  84.   Graph g;
  85.   {
  86.     comment("Drawing New Graph");
  87. ! /*   printf("%f %f translate\n", g->x_translate - g->x_axis->psize / 2.0,  */
  88. ! /*           g->y_translate); */
  89. !   printf("%f %f translate\n", g->x_translate, g->y_translate);
  90.     if (g->border) {
  91.       printline(0.0, 0.0, 0.0, g->y_axis->psize, 'x');
  92.       printline(0.0, 0.0, 0.0, g->x_axis->psize, 'y');
  93. ***************
  94. *** 384,391 ****
  95.     draw_curves(g);
  96.     draw_legend(g);
  97.     draw_strings(g);
  98. !   printf("%f %f translate\n", - g->x_translate + g->x_axis->psize / 2.0, 
  99. !           - g->y_translate);
  100.   
  101.   }
  102.   
  103. --- 385,393 ----
  104.     draw_curves(g);
  105.     draw_legend(g);
  106.     draw_strings(g);
  107. ! /*   printf("%f %f translate\n", - g->x_translate + g->x_axis->psize / 2.0,  */
  108. ! /*           - g->y_translate); */
  109. !   printf("%f %f translate\n", - g->x_translate, - g->y_translate);
  110.   
  111.   }
  112.   
  113. ***************
  114. *** 424,434 ****
  115.     printf("\t/$F2psEnd\n");
  116.     printf("{$F2psEnteredState restore end} def\t%%%%EndProlog\n");
  117.     printf("$F2psBegin\n");
  118. !   printf("%f 0 translate\n", gs->width / 2.0);
  119. !   if (pp)
  120.       printf("%f %f translate\n",
  121. !       ((8.5 * FCPI) - (gs->bb[2] - gs->bb[0])) / 2.0,     
  122. !       (gs->bb[3] > (3*FCPI)) ? ((11*FCPI) - gs->bb[3]) / 2 : (5.5*FCPI));
  123.     printf("1 setlinecap 1 setlinejoin\n");
  124.     printf("0.700 setlinewidth\n");
  125.   }
  126. --- 426,436 ----
  127.     printf("\t/$F2psEnd\n");
  128.     printf("{$F2psEnteredState restore end} def\t%%%%EndProlog\n");
  129.     printf("$F2psBegin\n");
  130. !   if (pp) {
  131.       printf("%f %f translate\n",
  132. !       (((8.5 * FCPI) - gs->width) / 2.0) - gs->bb[0],     
  133. !       (((11.0 * FCPI) - gs->height) / 2.0) - gs->bb[1]);     
  134. !   }
  135.     printf("1 setlinecap 1 setlinejoin\n");
  136.     printf("0.700 setlinewidth\n");
  137.   }
  138. *** ../work/edit.c    Mon Jan 27 13:19:27 1992
  139. --- edit.c    Mon Jan 27 13:00:31 1992
  140. ***************
  141. *** 1,7 ****
  142.   /* 
  143.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/edit.c,v $
  144. !  * $Revision: 7.1 $
  145. !  * $Date: 92/01/23 15:57:49 $
  146.    * $Author: jsp $
  147.    */
  148.   
  149. --- 1,7 ----
  150.   /* 
  151.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/edit.c,v $
  152. !  * $Revision: 7.2 $
  153. !  * $Date: 92/01/27 12:55:45 $
  154.    * $Author: jsp $
  155.    */
  156.   
  157. *** ../work/jgraph.1    Mon Jan 27 13:19:32 1992
  158. --- jgraph.1    Mon Jan 27 13:00:39 1992
  159. ***************
  160. *** 253,260 ****
  161.   \fBY\fR
  162.   and
  163.   \fBX\fR
  164. ! inches, respectively.  If you still need further control over the
  165. ! bounding box, try the
  166.   \fBbbox\fR
  167.   command.  If there's more than one page in the jgraph file, 
  168.   \fBY,\fR
  169. --- 253,261 ----
  170.   \fBY\fR
  171.   and
  172.   \fBX\fR
  173. ! inches, respectively, but to maintain the current centering of the 
  174. ! graph.  If you still need further control over the
  175. ! bounding box (e.g. to change the centering), try the
  176.   \fBbbox\fR
  177.   command.  If there's more than one page in the jgraph file, 
  178.   \fBY,\fR
  179. ***************
  180. *** 261,268 ****
  181.   \fBX\fR
  182.   and
  183.   \fBbbox\fR
  184. ! values can be given for each graph.  I'm not sure if that really
  185. ! means anything though.
  186.   .TP
  187.   \fBbbox \fIfloat\fB \fIfloat\fB \fIfloat\fB \fIfloat\fB\fR
  188.   If the 
  189. --- 262,268 ----
  190.   \fBX\fR
  191.   and
  192.   \fBbbox\fR
  193. ! values can be given for each graph.
  194.   .TP
  195.   \fBbbox \fIfloat\fB \fIfloat\fB \fIfloat\fB \fIfloat\fB\fR
  196.   If the 
  197. ***************
  198. *** 276,281 ****
  199. --- 276,285 ----
  200.   to see what the bounding box is that jgraph produces, and then
  201.   alter that accordingly with
  202.   \fBbbox.\fR
  203. + The main use for this is to change the automatic centering that jgraph
  204. + performs:  Usually the center of the bounding box that jgraph computes 
  205. + is put at the center of the page.  Changing the bbox changes this 
  206. + center.
  207.   .PD
  208.   .RE
  209.   .LP
  210. ***************
  211. *** 391,406 ****
  212.   .PP
  213.   .TP
  214.   \fBx_translate \|[\fIfloat\fB\|]\fR   
  215. ! By default, graphs are drawn centered at the
  216. ! bottom of the page.  This command lets the user move the graph
  217. ! horizontally 
  218. ! \fB\|[\fIfloat\fB\|] \fR
  219. ! inches.
  220.   .TP
  221.   \fBy_translate \|[\fIfloat\fB\|]\fR   
  222. ! This moves the graph 
  223.   \fB\|[\fIfloat\fB\|] \fR
  224. ! inches vertically.
  225.   .TP
  226.   \fBX \|[\fIfloat\fB\|]\fR
  227.   .br
  228. --- 395,422 ----
  229.   .PP
  230.   .TP
  231.   \fBx_translate \|[\fIfloat\fB\|]\fR   
  232. ! .br
  233. ! .ns
  234.   .TP
  235.   \fBy_translate \|[\fIfloat\fB\|]\fR   
  236. ! By default, the bottom left-hand corner of each graph is at point
  237. ! (0,0) (final postscript units).
  238. ! \fBX_translate\fR
  239. ! and
  240. ! \fBY_translate\fR
  241. ! tranlate the bottom left-hand corner of the graph 
  242.   \fB\|[\fIfloat\fB\|] \fR
  243. ! inches.  The main use of this is to draw more than one graph on 
  244. ! a page.  Note that jgraph considers all the graphs drawn on the
  245. ! page when it computes its bounding box for centering.  Thus, if
  246. ! only one graph is drawn, it will always be centered on the page, 
  247. ! regardless of its 
  248. ! \fBX_translate\fR
  249. ! and
  250. ! \fBY_translate\fR
  251. ! values.  These values are used for relative placement of the graphs.
  252. !    To change the centering of the graphs, use
  253. ! \fBbbox.\fR
  254.   .TP
  255.   \fBX \|[\fIfloat\fB\|]\fR
  256.   .br
  257. ***************
  258. *** 1185,1188 ****
  259.   .sp
  260.   There may well be loads of other bugs.  Send to jsp@princeton.edu.
  261.   .sp
  262. ! This is $Revision: 7.1 $.
  263. --- 1201,1204 ----
  264.   .sp
  265.   There may well be loads of other bugs.  Send to jsp@princeton.edu.
  266.   .sp
  267. ! This is $Revision: 7.2 $.
  268. *** ../work/jgraph.c    Mon Jan 27 13:19:33 1992
  269. --- jgraph.c    Mon Jan 27 13:00:32 1992
  270. ***************
  271. *** 1,7 ****
  272.   /* 
  273.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/jgraph.c,v $
  274. !  * $Revision: 7.1 $
  275. !  * $Date: 92/01/23 15:57:54 $
  276.    * $Author: jsp $
  277.    */
  278.   
  279. --- 1,7 ----
  280.   /* 
  281.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/jgraph.c,v $
  282. !  * $Revision: 7.2 $
  283. !  * $Date: 92/01/27 12:55:50 $
  284.    * $Author: jsp $
  285.    */
  286.   
  287. *** ../work/jgraph.h    Mon Jan 27 13:19:34 1992
  288. --- jgraph.h    Mon Jan 27 13:00:33 1992
  289. ***************
  290. *** 1,7 ****
  291.   /* 
  292.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/jgraph.h,v $
  293. !  * $Revision: 7.1 $
  294. !  * $Date: 92/01/23 15:57:56 $
  295.    * $Author: jsp $
  296.    */
  297.   
  298. --- 1,7 ----
  299.   /* 
  300.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/jgraph.h,v $
  301. !  * $Revision: 7.2 $
  302. !  * $Date: 92/01/27 12:55:52 $
  303.    * $Author: jsp $
  304.    */
  305.   
  306. *** ../work/list.c    Mon Jan 27 13:19:34 1992
  307. --- list.c    Mon Jan 27 13:00:34 1992
  308. ***************
  309. *** 1,7 ****
  310.   /* 
  311.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/list.c,v $
  312. !  * $Revision: 7.1 $
  313. !  * $Date: 92/01/23 15:57:57 $
  314.    * $Author: jsp $
  315.    */
  316.   
  317. --- 1,7 ----
  318.   /* 
  319.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/list.c,v $
  320. !  * $Revision: 7.2 $
  321. !  * $Date: 92/01/27 12:55:53 $
  322.    * $Author: jsp $
  323.    */
  324.   
  325. *** ../work/list.h    Mon Jan 27 13:19:35 1992
  326. --- list.h    Mon Jan 27 13:00:34 1992
  327. ***************
  328. *** 1,7 ****
  329.   /* 
  330.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/list.h,v $
  331. !  * $Revision: 7.1 $
  332. !  * $Date: 92/01/23 15:57:58 $
  333.    * $Author: jsp $
  334.    */
  335.   
  336. --- 1,7 ----
  337.   /* 
  338.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/list.h,v $
  339. !  * $Revision: 7.2 $
  340. !  * $Date: 92/01/27 12:55:54 $
  341.    * $Author: jsp $
  342.    */
  343.   
  344. *** ../work/printline.c    Mon Jan 27 13:19:36 1992
  345. --- printline.c    Mon Jan 27 13:00:35 1992
  346. ***************
  347. *** 1,7 ****
  348.   /* 
  349.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/printline.c,v $
  350. !  * $Revision: 7.1 $
  351. !  * $Date: 92/01/23 15:58:00 $
  352.    * $Author: jsp $
  353.    */
  354.   
  355. --- 1,7 ----
  356.   /* 
  357.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/printline.c,v $
  358. !  * $Revision: 7.2 $
  359. !  * $Date: 92/01/27 12:55:56 $
  360.    * $Author: jsp $
  361.    */
  362.   
  363. *** ../work/prio_list.c    Mon Jan 27 13:19:37 1992
  364. --- prio_list.c    Mon Jan 27 13:00:35 1992
  365. ***************
  366. *** 1,7 ****
  367.   /* 
  368.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/prio_list.c,v $
  369. !  * $Revision: 7.1 $
  370. !  * $Date: 92/01/23 15:58:01 $
  371.    * $Author: jsp $
  372.    */
  373.   
  374. --- 1,7 ----
  375.   /* 
  376.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/prio_list.c,v $
  377. !  * $Revision: 7.2 $
  378. !  * $Date: 92/01/27 12:55:57 $
  379.    * $Author: jsp $
  380.    */
  381.   
  382. *** ../work/prio_list.h    Mon Jan 27 13:19:37 1992
  383. --- prio_list.h    Mon Jan 27 13:00:36 1992
  384. ***************
  385. *** 1,7 ****
  386.   /* 
  387.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/prio_list.h,v $
  388. !  * $Revision: 7.1 $
  389. !  * $Date: 92/01/23 15:58:02 $
  390.    * $Author: jsp $
  391.    */
  392.   
  393. --- 1,7 ----
  394.   /* 
  395.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/prio_list.h,v $
  396. !  * $Revision: 7.2 $
  397. !  * $Date: 92/01/27 12:55:58 $
  398.    * $Author: jsp $
  399.    */
  400.   
  401. *** ../work/process.c    Mon Jan 27 13:19:38 1992
  402. --- process.c    Mon Jan 27 13:00:36 1992
  403. ***************
  404. *** 1,7 ****
  405.   /* 
  406.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/process.c,v $
  407. !  * $Revision: 7.1 $
  408. !  * $Date: 92/01/23 15:58:03 $
  409.    * $Author: jsp $
  410.    */
  411.   
  412. --- 1,7 ----
  413.   /* 
  414.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/process.c,v $
  415. !  * $Revision: 7.2 $
  416. !  * $Date: 92/01/27 12:55:59 $
  417.    * $Author: jsp $
  418.    */
  419.   
  420. *** ../work/show.c    Mon Jan 27 13:19:40 1992
  421. --- show.c    Mon Jan 27 13:00:37 1992
  422. ***************
  423. *** 1,7 ****
  424.   /* 
  425.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/show.c,v $
  426. !  * $Revision: 7.1 $
  427. !  * $Date: 92/01/23 15:58:06 $
  428.    * $Author: jsp $
  429.    */ 
  430.   
  431. --- 1,7 ----
  432.   /* 
  433.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/show.c,v $
  434. !  * $Revision: 7.2 $
  435. !  * $Date: 92/01/27 12:56:02 $
  436.    * $Author: jsp $
  437.    */ 
  438.   
  439. *** ../work/token.c    Mon Jan 27 13:19:49 1992
  440. --- token.c    Mon Jan 27 13:00:39 1992
  441. ***************
  442. *** 1,7 ****
  443.   /* 
  444.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/token.c,v $
  445. !  * $Revision: 7.1 $
  446. !  * $Date: 92/01/23 15:58:07 $
  447.    * $Author: jsp $
  448.    */
  449.   
  450. --- 1,7 ----
  451.   /* 
  452.    * $Source: /n/fs/vd/jsp/src/jgraph/RCS/token.c,v $
  453. !  * $Revision: 7.2 $
  454. !  * $Date: 92/01/27 12:56:06 $
  455.    * $Author: jsp $
  456.    */
  457.   
  458.  
  459. exit 0 # Just in case...
  460.