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