plotutils
Package
The GNU plotutils
package contains software
for both programmers and technical users. Its centerpiece is
libplot
, a powerful C/C++ function library for exporting
2-D vector graphics in many file formats, both vector and
bitmap. On the X Window System, it can also do 2-D vector
graphics animations.
libplot
is device-independent, in the sense that
its API (application programming interface) does not depend on the
type of graphics file to be exported. A Postscript-like API is used
both for file export and for graphics animations.
A libplot
programmer needs to learn only one API: not
the details of many graphics file formats.
The package also contains command-line programs for plotting
scientific data, such as GNU graph
for XY plotting.
Many of them use libplot
to export graphics. So, they
can export graphics in any of libplot
's supported
formats, such as
libplot
converts Postscript-style paths to bitmaps.)
xfig
drawing editor. (Edit a 2-D drawing with a mouse, after generating
it programmatically!)
The current version of the plotutils
package
is 2.6, released September 2009. It can be installed on
GNU/Linux, FreeBSD, and Unix systems.
The plotutils
package comes with a 185-page manual.
Here
is an
English-language version of the manual, and here is
a
Japanese-language version of the manual. People working through
the many examples given in the manual should look at the
expected
output (PDF). (Thanks to
Daisuke TOMINAGA for the last
two items!).
The package is free software. Its source code is distributed as a 3.7 megabyte gzipped tar file. Here is how you can get it.
It includes
graph
, which plots 2-D datasets or data
streams in real time. Being designed for command-line use, it
can be used in shell scripts. It produces output on an
X Window System display, in SVG format, in PNG format, in PNM
format, in pseudo-GIF format, in WebCGM format, in Illustrator
format, in Postscript format, in PCL 5 format, in
HP-GL/2 format, in Fig format
(editable with the xfig
drawing editor), in ReGIS format, in Tektronix format, or in
GNU Metafile format. Output in Postscript format may be
edited with the idraw
drawing editor.
idraw
is available in the ivtools
package from Vectaport, Inc. Both xfig
and
idraw
are free software.
plot
, which translates GNU Metafile format to
any of the other formats.
tek2plot
, for translating legacy Tektronix
data to any of the above formats.
pic2plot
, for translating the
pic
language (a scripting language for designing
box-and-arrow diagrams) to any of the above formats.
The pic
language was designed at Bell Labs as an
enhancement to the troff
text formatter.
plotfont
, for displaying
character maps of the fonts that are available in the above
formats.
spline
, which does spline interpolation of
data. It normally uses either cubic spline interpolation
or exponential splines in tension, but it can function as a
real-time filter under some circumstances.
ode
, which numerically integrates a system
consisting of one or more ordinary differential equations.
We developed these command-line programs to replace the Unix
command-line programs graph
, plot
, and
spline
. The GNU versions are far more powerful,
and are free software.
GNU libplot
, a C/C++ function library for
device-independent 2-D vector graphics. GNU
libplot
is compatible with the traditional Unix
libplot
library, but is far more powerful.
It is installed as part of the package. On systems
that support shared libraries, it is installed as a shared
library. A C++ class library called
libplotter
, which provides an object-oriented
interface to libplot
's functionality, is optionally
installed as well.
GNU libplot
and libplotter
support all
the output formats mentioned above (X11, SVG, PNG, PNM
format, pseudo-GIF,
WebCGM, Illustrator
format, idraw
-editable Postscript, PCL 5,
Fig format,
HP-GL/2, ReGIS,
Tektronix, and GNU Metafile). They can produce animated pseudo-GIFs,
and smooth, double-buffered animations on any X Window System
display. The libplot
imaging model is similar to
Postscript's. In any output format, they can draw the
following.
xfig
drivers support
the 35 standard Postscript fonts, and the SVG, Illustrator,
PCL 5
and HP-GL/2 drivers support the 45 standard
PCL 5 fonts. All drivers support a set of
22 Hershey vector fonts. This includes HersheyCyrillic,
a Russian font that uses the KOI8-R
encoding, and HersheyEUC, a Japanese font that uses the
8-bit EUC-JP encoding. Japanese text strings may include both
syllabic characters (Hiragana and Katakana) and ideographic
characters (Kanji). A library of over 600 Kanji is
built in.
When using libplot
or libplotter
, a
programmer draws vector graphics in a `user frame', rather than
in the device frame. As in Postscript, the user frame may be
transformed into the device frame by an arbitrary affine map.
Scaling, rotation, shearing, and translation are all
supported.
Even though the plotutils
package can produce what
appear to be GIFs and animated GIFs, it does not transgress any
patents covering the LZW compression algorithm. The reason is
that instead of LZW encoding, it uses run-length encoding, which
is not patentable. To avoid confusion, we call the files
produced by the package `pseudo-GIF files'.
A simple piechart plotting program that illustrates the use of
GNU libplot
is available here.
It was contributed by Bernhard
Reiter. Chris
Elliott has developed a libplot
-based program
called ascii_chart
,
which takes data in a two-column format and prepares a piechart
plot or a line plot.
There is a Python wrapper for libplot
, and
a SWIG wrapper
too. libplot
drawing functions can also be used from a
Perl module (Graphics::Libplot).
plotutils
package?
The two primary authors of the plotutils
package
are Robert Maier
and Nick Tufillaro
(who developed ode
). Many other people have also
contributed. The rasterization code used by the export
filters, which is distributed as a separate package,
is based on the scan-conversion code in the sample X Window
System server.
Visit the Free Software Directory's Science section for more utilities and related software.
Return to the GNU Project home page.
Please send FSF & GNU inquiries to
[email protected].
There are also other ways to contact
the FSF.
Please send broken links and other corrections (or suggestions) to
[email protected].
Please see the Translations README for information on coordinating and submitting translations of this article.
Copyright (C) 2000, 2004, 2007 Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110, USA
Verbatim copying and distribution of this entire article is
permitted worldwide without royalty in any medium provided
this notice is preserved.
Updated: $Date: 2019/10/30 14:04:53 $ $Author: th_g $