graph.1 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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 GRAPH 1
  17. .SH NAME
  18. graph \- compile graphs into pic input
  19. .SH SYNOPSIS
  20. .B graph
  21. [ options ]
  22. [
  23. .I filename
  24. \&.\|.\|.
  25. ]
  26. .SH DESCRIPTION
  27. .LP
  28. .B graph
  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. 1 1
  41. 2 2
  42. 3 3
  43. "sloped across
  44. 1 4
  45. 2 4
  46. 3 4
  47. "straight across
  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.
  78. .IP -medium
  79. make the graph take about 1/2 the page.
  80. .IP -small
  81. make the graph be small.
  82. .IP -grapheach
  83. draw each data set in its own graph.
  84. .IP -nolabels
  85. no X/Y/Title labels.
  86. .IP -nodatal
  87. no data set labels.
  88. .IP -nomarks
  89. do not mark each data point with distinct markers (endpoints are still
  90. marked).
  91. .IP -k
  92. print values larger than 1000 as value/1000.
  93. .IP -xk
  94. multiply X input by 1024 (blech).
  95. .IP -yk
  96. multiply Y input by 1024 (blech).
  97. .IP -xm
  98. multiply X input by 1024*1024 (blech).
  99. .IP -ym
  100. multiply Y input by 1024*1024 (blech).
  101. .IP -logx
  102. convert X input into lag base 2 of X input.
  103. .IP -logy
  104. convert Y input into lag base 2 of Y input.
  105. .SH EXAMPLE
  106. Workstation price performance from a Digital ad. Process with
  107. .DS
  108. .ps -2
  109. graph -rev workstations | groff -TX75
  110. "%T Workstation Price / Performance, 6/93
  111. "%X SPECINT 92 Performance
  112. "%Y Price in $1000's
  113. 35 5
  114. 65 10
  115. 78 15
  116. 110 70
  117. "Dec AXP line
  118. 25 4
  119. 25 8
  120. 38 16
  121. 48 21
  122. 52 23
  123. 64 27
  124. "Sun SPARC line
  125. .DE
  126. .ps
  127. .SH "QUARTILE FORMAT"
  128. Data points are \f(CBx y1 y2 y3 y4 y5\fP. You get a two lines from the
  129. first two y values, a mark at the third, and another line from the last two.
  130. .SH "SEE ALSO"
  131. .BR gtroff (1),
  132. .BR gpic (1),
  133. .BR perl (1).
  134. .SH BUGS
  135. This should probably be called pic_graph or something like that.
  136. .LP
  137. This isn't done as much as I would like.
  138. It isn't integrated with the groff preprocessor yet.
  139. It doesn't know about .GS/.GE things. I use it to manually generate
  140. a pic file and then include that.