bargraph.1 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. .\" $Id$
  2. .TH BARGRAPH 1
  3. .SH NAME
  4. bargraph \- compile bar graphs into pic input
  5. .SH SYNOPSIS
  6. .B bargraph
  7. [
  8. .I filename
  9. \&.\|.\|.
  10. ]
  11. .SH DESCRIPTION
  12. .LP
  13. .B bargraph
  14. is a perl script which
  15. takes a set of Y data with labels and generates a (human readable) pic script
  16. that will produce the bar graph.
  17. The output (pic input) is commented and is designed such that you should be
  18. able to go in and adjust it to fit your document should you need to do so.
  19. .LP
  20. The input data format is:
  21. .sp
  22. .nf
  23. .in +4
  24. 3 foo bar
  25. 9 bigger foo
  26. "Silly example
  27. .in
  28. .fi
  29. .sp
  30. with output like
  31. .sp
  32. .nf
  33. .in +2
  34. .ft CW
  35. bigger
  36. foo
  37. +----------+
  38. | |
  39. foo | |
  40. bar | |
  41. +----------+ | |
  42. | | | |
  43. +----------+ +----------+
  44. -------------------------------
  45. 3 9
  46. Silly example
  47. .ft
  48. .in
  49. .fi
  50. .SH OPTIONS
  51. The following command line options are available
  52. .TP 10
  53. -big
  54. Make the x/y defaults be 7.5 inches, crank up the title size, and don't
  55. put a spacer at the top. Used for printing a graph on a full page.
  56. .TP
  57. -nobox
  58. Do not put an outline box around the bargraph.
  59. .SH "CONTROL OPTIONS"
  60. The following may be included in the graph to control the format
  61. of the graph. They must be at the beginning of a line and by themselves.
  62. .TP 18
  63. %ps <ps>
  64. point size. Default is 10.
  65. .TP
  66. %ft <ft>
  67. font. Default is CB.
  68. .TP
  69. %labelgap <val>
  70. the space in inches between fill labels. The bars may be filled with different
  71. fill values (no patterns yet, pic doesn't do that). If you want to label
  72. these, the labels are labelgap inches apart. Default is 1.5 inches.
  73. .TP
  74. %xsize <val>
  75. the width of the graph in inches. Default is 7 inches.
  76. .TP
  77. %ysize <val>
  78. the height of the graph in inches. Default is 6 inches.
  79. .TP
  80. %Title n|s <title>
  81. the title of the bargraph. The title option is followed by a
  82. a "n"orth (top) or "s"outh (bottom) indicator which controls placement
  83. of the title. No default.
  84. .TP
  85. %titleplus <val>
  86. increases the size of the title in pointsize. Default is 0.
  87. .TP
  88. %boxpercent <val>
  89. a value between 0 and 100 that controls how closely the
  90. bars are to each other. A value of 100 means the bars touch.
  91. Default is 75.
  92. .TP
  93. %worse <D> <W>
  94. An idiot arrow is drawn to indicate which way is worse.
  95. <D> is the direction and must be "up" or "down".
  96. <W> is the location specifier and must be one of
  97. "n"orth, "w"est, "e"ast, "s"outh, "nw" northwest, ne, sw, se, etc.
  98. .TP
  99. %better <D> <W>
  100. An idiot arrow is drawn to indicate which way is better.
  101. <D> is the direction and must be "up" or "down".
  102. <W> is the location specifier and must be one of
  103. "n"orth, "w"est, "e"ast, "s"outh, "nw" northwest, ne, sw, se, etc.
  104. .TP
  105. %fakemax
  106. pretend that one data point was this big when autoscaling. THis
  107. is used to make a series of bargraphs be all drawn to the same
  108. scale.
  109. .SH "FILL CONTROL"
  110. Each datum may be follwed by a fill specifier as follows
  111. .sp .5
  112. .ti +.5i
  113. 3 foo bar %fill.5
  114. .sp .5
  115. Labels may be specified to group a set of data that all have
  116. the same data. If a line appears like
  117. .sp .5
  118. .ti +.5i
  119. %label.5 The foo bar data
  120. .sp .5
  121. then you get a label below the graph.
  122. .SH "SEE ALSO"
  123. .BR gtroff (1),
  124. .BR graph (1),
  125. .BR gpic (1)
  126. .SH TODO
  127. Make a -horizontal option that prints the graphs the other way.
  128. .LP
  129. Hack pick to get access to postscripts stipple patterns.
  130. .SH BUGS
  131. This isn't done. It isn't integrated with the groff preprocessor yet.
  132. It doesn't know about .GS/.GE thingys. I use it to manually generate
  133. a pic file and then include that. I have to talk to James to
  134. see if he wants it as part of the gpic stuff.