pgraph.1 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. .\" $Id$
  2. .de DS
  3. . sp .5
  4. . nf
  5. . in +4
  6. . ft CW
  7. . vs -1
  8. ..
  9. .de DE
  10. . sp .5
  11. . fi
  12. . in
  13. . ft
  14. . vs
  15. ..
  16. .TH PGRAPH 1 "Nov, 1995" "lm@sgi.com" "Docomentation tools"
  17. .SH NAME
  18. pgraph \- compile graphs into pic input
  19. .SH SYNOPSIS
  20. .B pgraph
  21. [ options ]
  22. [
  23. .I filename
  24. \&.\|.\|.
  25. ]
  26. .SH DESCRIPTION
  27. .LP
  28. .B pgraph
  29. is a perl script which
  30. takes sets of X Y data and generates a (human readable) pic program
  31. that will produce the graphed data. The output is designed such that
  32. you can save it in a file and tweak it to make it fit your document.
  33. Try one and look at the output. The output is actually commented.
  34. .LP
  35. The graph is autosized and auto ticked.
  36. .LP
  37. The input data format is similar
  38. that of xgraph(1), i.e.,
  39. .DS
  40. "sloped across
  41. 1 1
  42. 2 2
  43. 3 3
  44. "straight across
  45. 1 4
  46. 2 4
  47. 3 4
  48. .DE
  49. .SH "CONTROL OPTIONS"
  50. .LP
  51. You may set the graph title, the X title, and the Y title with the
  52. following control sequences in the data stream:
  53. .DS
  54. %T Graph title in +4 point font
  55. %X X axis title and/or units in +2 point font
  56. %Y Y axis title and/or units in +2 point font
  57. %fakemax-X <value> force graph to be that big
  58. %fakemax-Y <value> force graph to be that big
  59. %fakemin-X <value> force graph to be that small
  60. %fakemin-Y <value> force graph to be that small
  61. .DE
  62. .SH OPTIONS
  63. .IP -rev 12
  64. reverse X/Y data sense (and titles). Note this is done after processing
  65. any fudging of the input data stream(s) (see -xk, -yk, -logx, etc below).
  66. .IP -below
  67. put data set titles below the graph rather than to the right.
  68. .IP -close
  69. no extra space around the data's endpoints.
  70. .IP -qline
  71. connect the quartile center points.
  72. .IP -grid
  73. dotted line grid marks.
  74. .IP -nobox
  75. no box around whole graph.
  76. .IP -big
  77. make the graph take the whole page, and be about 8 inches tall by 7 inches
  78. wide and the title is +8 points.
  79. .IP -slide
  80. make the graph be 4.25 inches square to fit in slides,
  81. in a helvetica bold 10 point font.
  82. .IP -small
  83. make the graph be small, 1.75 inches square, and use an 8 point bold font.
  84. .IP -grapheach
  85. draw each data set in its own graph.
  86. .IP -nolabels
  87. no X/Y/Title labels.
  88. .IP -notitle
  89. no Title label.
  90. .IP -nodatal
  91. no data set labels.
  92. .IP -nomarks
  93. do not mark each data point with distinct markers (endpoints are still
  94. marked).
  95. .IP -k
  96. print values larger than 1000 as value/1000.
  97. .IP -xk
  98. multiply X input by 1024 (blech).
  99. .IP -yk
  100. multiply Y input by 1024 (blech).
  101. .IP -xm
  102. multiply X input by 1024*1024 (blech).
  103. .IP -ym
  104. multiply Y input by 1024*1024 (blech).
  105. .IP -logx
  106. convert X input into log base 2 of X input.
  107. .IP -logy
  108. convert Y input into log base 2 of Y input.
  109. .SH EXAMPLE
  110. Workstation price performance from a Digital ad. Process with
  111. .DS
  112. .ps -2
  113. graph -rev workstations | groff -TX75
  114. %T Workstation Price / Performance, 6/93
  115. %X SPECINT 92 Performance
  116. %Y Price in $1000's
  117. "Dec AXP line
  118. 35 5
  119. 65 10
  120. 78 15
  121. 110 70
  122. "Sun SPARC line
  123. 25 4
  124. 25 8
  125. 38 16
  126. 48 21
  127. 52 23
  128. 64 27
  129. .DE
  130. .ps
  131. .SH "QUARTILE FORMAT"
  132. Data points are \f(CBx y1 y2 y3 y4 y5\fP. You get a two lines from the
  133. first two y values, a mark at the third, and another line from the last two.
  134. .SH "SEE ALSO"
  135. .BR gtroff (1),
  136. .BR gpic (1),
  137. .BR perl (1).
  138. .SH BUGS
  139. -grapheach assumes the set of N graphs will fit on one page.
  140. .LP
  141. Since it is just a simple perl script, I tend to be constantly adding
  142. one more feature on the fly. Consult the script for the latest set of
  143. options. Development is typically done by using the closest set of options
  144. to generate the graph, massage the graph to do what you want, then add that
  145. set of changes as a new option.
  146. .LP
  147. This isn't done as much as I would like.
  148. It isn't integrated with the groff preprocessor yet.
  149. It doesn't know about .GS/.GE things. I use it to manually generate
  150. a pic file and then include that.
  151. .LP
  152. I need to include some example data sets with pgraph.