README 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. This is release 2.6 of the GNU plotutils (plotting utilities) package,
  2. including release 4.4 of GNU libplot: a thread-safe function library for
  3. exporting two-dimensional vector graphics files, and for displaying
  4. animated vector graphics under the X Window System. The Web page for the
  5. package is http://www.gnu.org/software/plotutils/plotutils.html .
  6. In the top-level source directory, the file INSTALL contains generic
  7. instructions for installing a GNU package, and the file INSTALL.pkg
  8. contains package-specific instructions. Please read them _in full_,
  9. as well as this file, before attempting to install the package.
  10. Also in the top-level source directory, the file COMPAT contains release
  11. notes, and comments on compatibility with previous versions. The file
  12. PROBLEMS is worth looking at too.
  13. Please send bug reports to <bug-plotutils@gnu.org>, and suggestions for
  14. longer-range improvements to both <bug-plotutils@gnu.org> and the principal
  15. author and current maintainer, Robert Maier <rsm@math.arizona.edu>.
  16. NOTE: Neither the `pic2plot' program nor the `libplotter' C++ class library
  17. is built by default, since they require a working C++ compiler. But it is
  18. easy to request that they be built. For details, see INSTALL.pkg. Also, a
  19. standalone version of the `libxmi' scan-conversion library isn't built by
  20. default, since `libxmi' is distributed as a separate package.
  21. ----------------------------------------------------------------------
  22. The contents of the plotutils package are:
  23. 1. libplot. This is the function library for device-independent
  24. two-dimensional vector graphics that the sample
  25. command-line programs `graph', `plot', `pic2plot',
  26. `tek2plot', and `plotfont' (see below) are based on.
  27. On platforms that support shared libraries, it is
  28. installed as a shared library.
  29. If you are a programmer, you may use this library yourself,
  30. to export vector graphics in many different file formats.
  31. You may also use it to create vector graphics animations
  32. under the X Window System.
  33. There are two versions of libplot: a conventional library
  34. of C functions, which is also referred to as libplot, and
  35. its C++ counterpart `libplotter', which is a class library.
  36. The latter is more convenient to use if you are programming
  37. in C++. You must request at installation time that
  38. `libplotter' be built and installed, since it is not done
  39. automatically. (See ./INSTALL.pkg.) When we refer to
  40. `libplot', by default we mean both the C and the C++ versions.
  41. libplot includes functions to draw objects of many types:
  42. lines and polylines, circles and ellipses, circular and
  43. elliptic arcs, quadratic and cubic Bezier curves, and
  44. marker symbols. Postscript-style `paths', made up of many
  45. segments, may be drawn. There is support for color (both
  46. pen color and fill color for objects).
  47. Output formats include X11, PNG, PNM (i.e. PBM/PGM/PPM),
  48. pseudo-GIF, SVG, Adobe Illustrator, Postscript and
  49. Encapsulated Postscript (editable with the idraw drawing
  50. editor), CGM (by default, binary version-3 CGM output that
  51. complies with the WebCGM profile for Web-based vector
  52. graphics), Fig (editable with the xfig drawing editor), PCL
  53. 5, HP-GL and HP-GL/2, Regis, Tektronix, and GNU metafile
  54. format. GNU metafile format may be translated into any of
  55. the other formats with the `plot' utility (see below).
  56. NOTE: pseudo-GIF format is not the same as GIF format,
  57. since it does not use the LZW coding scheme. So it does
  58. not transgress the well known Unisys LZW patent. However,
  59. applications that can read GIF files should be able to read
  60. pseudo-GIF files. libplot can also create animated
  61. pseudo-GIFs.
  62. libplot includes extensive support for accurate sizing and
  63. positioning of text. This includes the placement of
  64. subscripts and superscripts. Its X11, SVG, Illustrator,
  65. Postscript, CGM, and Fig drivers all support the 35
  66. standard Postscript fonts, and its PCL 5 and HP-GL/2
  67. drivers support the 45 standard LaserJet fonts. In
  68. addition, all of these, together with the other (bitmap)
  69. drivers, support a set of 22 Hershey vector fonts. The
  70. Hershey fonts include HersheyCyrillic and HersheyEUC (for
  71. Japanese). Note that the Hershey fonts are not
  72. anti-aliased, so they will look much better in vector
  73. output, than in bitmap output.
  74. All supported fonts may be arbitrarily rotated and scaled.
  75. All fonts, except for symbol and dingbat fonts, and the
  76. Hershey Cyrillic and Japanese fonts, use the ISO-Latin-1
  77. encoding (a superset of ASCII; the ISO-Latin-1 support in
  78. the 20 non-Cyrillic, non-Japanese Hershey fonts is
  79. extensive but not quite complete).
  80. (Clones of the 35 standard Postscript fonts, in Type 1
  81. format, have been contributed by URW GmbH for distribution
  82. under the GNU General Public License. They may well be
  83. available on your system, already. If not, you may use the
  84. versions distributed with this package. Installation
  85. instructions are in the file ./INSTALL.fonts. Instructions
  86. for obtaining and installing Type 1 versions of the 45
  87. standard LaserJet fonts are included as well.)
  88. Similarly to Postscript, libplot has the nice feature that
  89. user coordinates (in terms of which you express the
  90. location of graphical objects) may be transformed to device
  91. coordinates by an arbitrary affine transformation. A stack
  92. of drawing states (i.e., graphics contexts) is supported too.
  93. 2. libxmi. This is a function library for drawing X11-style vector
  94. graphics (lines, polylines, polygons, circular and elliptic
  95. arcs) on an in-memory bitmap. It is small, but powerful:
  96. it contains a modernized version of the scan conversion
  97. code contained in most X11 servers, which was written in
  98. the mid-to-late 1980's by programmers associated with the
  99. X Consortium. It is built and installed only if you specify
  100. the `--enable-libxmi' option to ./configure. The public
  101. header file for libxmi, xmi.h, will also be installed, as
  102. will the documentation (in texinfo format).
  103. The reason `libxmi' isn't built by default is that it's
  104. also distributed as a separate package. Actually, what
  105. isn't built by default is a standalone version of libxmi.
  106. libplot/libplotter always contains an internal libxmi
  107. module, which helps it produce output in bitmap formats.
  108. 3. Sample command-line programs based on libplot, including the following.
  109. graph. A full-featured scientific plotting program for plotting
  110. XY (i.e. 2-dimensional) data. It plots a stream of
  111. datapoints, in real time if possible. There is a
  112. well-chosen set of command-line options for adjusting the
  113. visual appearance of the plot, labelling axes (with
  114. expressions that may include subscripts and superscripts,
  115. and mathematical symbols), choosing marker symbols from
  116. various fonts, etc. Multiplotting is supported (a plot may
  117. include sub-plots, side-by-side or inset). Filled regions
  118. are also supported.
  119. Unlike the well-known plotting program `gnuplot', `graph'
  120. is device-independent in the sense that its options do not
  121. depend on the display device the plot is destined for.
  122. To the maximum degree feasible, the output of `graph' will
  123. appear the same on all display devices.
  124. Which display device is driven, or output format is
  125. produced, is specified by the `-T' option. There are
  126. effectively many different variants of `graph',
  127. distinguished by the intended display device.
  128. graph -T X A variant that pops up an X window on an X
  129. display, and draws the plot in it. It is
  130. most useful on modern (X11R6) displays,
  131. which can rotate and scale text
  132. arbitrarily. It uses the 35 standard
  133. Postscript fonts.
  134. graph -T png A variant that produces output in PNG
  135. (Portable Network Graphics) format. Output
  136. in this format can be viewed with the free
  137. image display application `xv'.
  138. graph -T pnm A variant that produces output in
  139. `Portable Anymap' format (PBM/PGM/PPM,
  140. whichever is appropriate). Output
  141. in this format can be viewed with `xv',
  142. or translated to other formats with the
  143. `netpbm' package.
  144. graph -T gif A variant that produces output in a
  145. pseudo-GIF format that can be displayed
  146. by many applications that understand
  147. GIF format. The pseudo-GIF format uses
  148. run-length encoding, so it does not
  149. transgress the well known Unisys LZW
  150. patent.
  151. graph -T svg A variant that produces output in SVG
  152. (scalable vector graphics) format. SVG is
  153. the XML-based graphics format that
  154. has been endorsed by the W3 Consortium
  155. for Web use. See
  156. http://www.w3.org/Graphics .
  157. For comments on compatibility with other
  158. software that can edit or display
  159. SVG files, see the file ./COMPAT.
  160. graph -T ai A variant that produces output in a
  161. format that can be viewed or edited
  162. with Adobe Illustrator.
  163. graph -T ps A variant that produces EPS (encapsulated
  164. Postscript) output, which can be printed,
  165. displayed, or encapsulated in other
  166. documents. Any standard page size is
  167. supported (letter, legal, ANSI sizes, ISO
  168. sizes such as a4 and a3, etc.) The EPS
  169. output includes annotations that permit it
  170. to be edited with the freeware `idraw'
  171. drawing editor, or its successor
  172. `drawtool'. See http://www.vectaport.com .
  173. graph -T cgm A variant that produces CGM vector graphics
  174. files (Computer Graphics Metafiles, as
  175. defined by ISO 8632:1992). By default, its
  176. output files are binary version-3 CGM files
  177. that conform to the WebCGM profile for
  178. Web-based vector graphics (for WebCGM info,
  179. see http://www.cgmopen.org/ ).
  180. graph -T fig A variant that produces a plot that
  181. the freeware `xfig' drawing editor can
  182. edit. xfig can export the plot in numerous
  183. formats, such as GIF, X11 bitmap, and EPS.
  184. See http://duke.usask.ca/~macphed/soft/fig .
  185. graph -T pcl A variant that produces a plot in PCL 5
  186. format, which is a sophisticated version of
  187. Hewlett-Packard's Printer Control Language.
  188. You may send the plot to a non-Postscript
  189. LaserJet or a high-end inkjet. (Most
  190. inkjets do not support PCL 5.) This
  191. variant supports the 45 standard PCL 5
  192. fonts that are built into many
  193. non-Postscript printers, such as LaserJets.
  194. graph -T hpgl A variant that produces HP-GL (or by
  195. default, HP-GL/2) output. HP-GL is the
  196. Hewlett-Packard Graphics Language, and may
  197. be printed out or plotted on a
  198. Hewlett-Packard LaserJet printer or
  199. plotter. Also many applications, e.g. CAD
  200. applications, can import HP-GL or HP-GL/2
  201. figures. This variant supports the 45
  202. standard PCL 5 fonts that are built into
  203. many non-Postscript printers, such as
  204. LaserJets.
  205. graph -T regis A variant that produces ReGIS graphics
  206. output, suitable for viewing on a
  207. DECwindows dxterm or a DEC graphics
  208. terminal, such as a VT340, VT330, VT241, or
  209. VT240. (This variant lacks the Postscript
  210. fonts of the other variants though, like
  211. them, it has a complete set of vector
  212. Hershey fonts.)
  213. graph -T tek A variant that produces Tektronix output,
  214. suitable for viewing, e.g., on an X Windows
  215. xterm or an MS-DOS kermit doing Tektronix
  216. emulation. (This variant lacks the
  217. Postscript fonts of the other variants
  218. though, like them, it has a complete set of
  219. vector Hershey fonts. Also, it does not
  220. support filling of regions.)
  221. graph The `raw' variant, which produces output in
  222. GNU graphics metafile format. This is an
  223. enhanced version of the traditional plot(5)
  224. format found on some operating systems.
  225. The `plot' program (see below) must be used
  226. to convert this to another format, or to
  227. drive a display device.
  228. Of these variants, `graph -T X', `graph -T tek', and raw
  229. `graph' are real-time. That means that under some
  230. circumstances, they act as filters: they read data points
  231. from standard input, and plot them as they are read. For
  232. this to happen, the abscissa and ordinate ranges of the
  233. plot must be specified on the command line. (E.g., the
  234. user would do
  235. program | graph -T X -x xmin xmax -y ymin ymax
  236. where `program' generates a stream of data points.)
  237. All variants of `graph' will accept ASCII input (the
  238. default), or unformatted binary input (i.e., a stream of
  239. floating point numbers or integers), or input in the
  240. `table' format produced by the program `gnuplot' (which you
  241. may select by specifying the `-I g' option). Gnuplot will
  242. produce table-format output if you do `set terminal table';
  243. you can pipe gnuplot's output to any of the variants of
  244. graph by using the gnuplot `set output' command. If you
  245. are piping to `graph -T X', by repeatedly using the gnuplot
  246. `set output' command you may easily produce an arbitrarily
  247. large number of plots in different X windows, each in a
  248. different style.
  249. plot. This is a so-called plot filter, which takes a stream in GNU
  250. graphics metafile format, and either translates it to
  251. another format or uses it to drive a display device.
  252. Since this distribution includes `graph -T X', `graph -T
  253. png', `graph -T pnm', `graph -T gif', `graph -T svg',
  254. `graph -T ai', `graph -T ps', `graph -T cgm', `graph -T
  255. fig', `graph -T pcl', `graph -T hpgl', `graph -T regis',
  256. and `graph -T tek', all of which can drive display devices
  257. directly, `plot' is only occasionally useful. It may be
  258. used, though, to produce graphical output in more than one
  259. format at once. To do this, you would pipe the output of a
  260. datapoint-generating program to the raw variant of `graph',
  261. and then use the `tee' command to direct the output of raw
  262. `graph', which is in metafile format, to two separate
  263. invocations of `plot'.
  264. `plot' may also be useful as a post-processor for older
  265. programs that produce output in the traditional plot(5)
  266. graphics format. GNU metafile format is an enhanced version
  267. of plot(5) format.
  268. pic2plot. This is a utility program that takes a file in the pic
  269. language, and either translates it to another format or
  270. displays it on an X display. The pic language, which was
  271. developed at Bell Laboratories, is used for creating
  272. box-and-arrow diagrams of the kind frequently found in
  273. technical papers and textbooks. It was originally
  274. introduced as a feature of the Bell Labs `troff'
  275. text-processing software.
  276. You must request at installation time that pic2plot be
  277. built and installed, since it is not done automatically.
  278. (See ./INSTALL.pkg.)
  279. pic2plot is largely compatible with `gpic', the GNU
  280. implementation of the pic-to-troff translator. However,
  281. since it is built on top of libplot, it supports some new
  282. features. It supports all the output formats that libplot
  283. supports: X11, PNG, PNM, GIF, SVG, AI, PS, WebCGM, Fig,
  284. PCL, HP-GL, Tek, and Metafile.
  285. tek2plot. This is a utility program that emulates a Tektronix 4014
  286. terminal in the sense that it reads a stream of Tektronix
  287. commands, and either produces an output file in another
  288. format or displays the corresponding graphics on an X
  289. display. An output file in any of the graphics file
  290. formats that libplot support can be produced.
  291. tek2plot is useful if you have a legacy program that was
  292. designed to drive a Tektronix terminal or emulator, or if
  293. you have files in Tektronix format that need to be
  294. translated to a modern format, or edited.
  295. The directory ./tek2plot/teksamples includes a few files in
  296. Tektronix format that you may experiment with. You may
  297. also experiment by piping the output of `gnuplot', if you
  298. have configured it to produce Tektronix-format plots, to
  299. these filters (the gnuplot terminal types `kc_tek40xx',
  300. `km_tek40xx', `tek40xx', and `vttek' all work). tek2plot
  301. does an excellent job of emulating the non-interactive
  302. features of a Tektronix 4014, and although it does not
  303. support all the features supported by the Tektronix
  304. emulator in the MS-DOS version of kermit, it can certainly
  305. parse the output of the gnuplot Tektronix terminal drivers.
  306. plotfont. This is a simple utility that prints out a character
  307. chart for any font available to the above four utilities
  308. (graph, plot, pic2plot, tek2plot) and the underlying
  309. libplot library. All output formats are supported. Which
  310. fonts are available depends on the `-T' option that is
  311. specified, i.e., on the output format.
  312. hersheydemo. This is a demo program for the Hershey vector fonts,
  313. as implemented in the libplot library. It outputs a demo
  314. page, designed by Dr. Hershey himself. The page is taken
  315. from his 1972 article "A computer system for scientific
  316. typography", published in Computer Graphics and Image
  317. Processing (vol. 1, no. 4, pp. 373-385).
  318. Note that the Hershey vector fonts look much better in
  319. vector output formats, than they do in bitmap formats.
  320. That is because libplot does not currently do anti-aliasing
  321. of fonts (or more accurately the libxmi rasterization
  322. library, which it relies on, does not). You would do
  323. `hersheydemo -T ps > demo.ps' to produce PS output,
  324. `hersheydemo -T svg > demo.svg' to produce SVG output, etc.
  325. 4. Command-line mathematical programs not based on libplot, including the
  326. following.
  327. spline. This program does spline interpolation of input data, which
  328. may be of arbitrary dimensionality. That is, it takes a
  329. file of datapoints, and interpolates between them to
  330. produce an interpolated segment of the input data. It acts
  331. as a filter, though usually not as a real-time one (in the
  332. most common mode of operation, the entire input must be
  333. read before any data points are output).
  334. The output spline is normally a cubic spline, but if a
  335. `tension' parameter is set to a nonzero value, the output
  336. spline will be a so-called spline under tension. There is
  337. also support for doing cubic Bessel interpolation. If this
  338. option is selected, `spline' acts as a true real-time
  339. filter, since cubic Bessel interpolation is local rather
  340. than global.
  341. ode. This interactive program supplements the computation engine
  342. of `gnuplot', which will compute and plot functions, by
  343. providing the ability to integrate systems of ordinary
  344. differential equations (ODE's). ode will solve the initial
  345. value problem for one or more first-order ODE's, when
  346. provided with an explicit expression for each equation.
  347. ode parses the set of equations and the set of initial
  348. conditions, which may be typed in manually or read from a
  349. file, and then produces a stream of data points that may be
  350. piped to any of the variants of `graph'. If a real-time
  351. variant of `graph' (e.g. `graph -T X' or `graph -T tek') is
  352. used, the numerical solution will be displayed in real
  353. time, as it is generated.
  354. One application (certainly not the only one!) of ode is to
  355. graph the indefinite integrals of the sorts of function
  356. that gnuplot can graph. All the primitive real-valued
  357. functions that are built into gnuplot are built into ode.
  358. A directory of sample ode input files is installed (usually
  359. as /usr/local/share/ode or /usr/share/ode) as part of the
  360. package.
  361. double. This is a filter for converting, scaling and cutting
  362. unformatted (binary) or ASCII data streams. It is still
  363. under development and is not yet documented.