PGPLOT Graphics Subroutine Library
The PGPLOT Graphics Subroutine Library is a Fortran- or C-callable,
device-independent graphics package for making simple scientific graphs.
It is intended for making graphical images of publication quality with
minimum effort on the part of the user. For most applications, the
program can be device-independent, and the output can be directed to the
appropriate device at run time.
The PGPLOT library consists of two major parts: a device-independent
part and a set of device-dependent ``device handler'' subroutines for
output on various terminals, image displays, dot-matrix printers,
laser printers, and pen plotters. Common file formats supported
include PostScript and GIF.
PGPLOT itself is written mostly in standard Fortran-77, with a few
non-standard, system-dependent subroutines. PGPLOT subroutines can be
called directly from a Fortran-77 or Fortran-90 program. A C binding
library (cpgplot) and header file (cpgplot.h
) are
provided that allow PGPLOT to be called from a C or C++ program; the
binding library handles conversion between C and Fortran
argument-passing conventions.
PGPLOT has been tested with UNIX (most varieties, including Linux,
SunOS, Solaris, HPUX, AIX, and Irix) and OpenVMS operating systems. I
am unable to provide support for DOS, Windows, Windows/NT, or MacOS,
but I do distribute code provided by users for use with these
operating systems.
Some example graphs showing some of the capabilities of PGPLOT, and
source code in Fortran and C for a simple example, can be found in the
PGPLOT Portfolio. Caution: this page contains
several large graphics files.
PGPLOT is not public-domain software. However, it is freely
available for non-commercial use. The source code and documentation
are copyrighted by California Institute of Technology, and may not be
redistributed or placed on public Web servers without permission. The
software is provided ``as is'' with no warranty.
The current version of PGPLOT is 5.2.0.
For instructions for obtaining PGPLOT from my ftp site and for details
of supported operating systems, read the installation instructions.
If you cannot use ftp, PGPLOT is available on tape for a fee. Consult
tjp·astro.caltech.edu.
The manual PGPLOT Graphics Subroutine Library by
T. J. Pearson is being updated for version 5.2 of PGPLOT.
A draft of the manual is available: see the Table of Contents.
A PostScript file of the manual will be made available when it is
completed. A PostScript file of the old
manual (version 4.9, 0.27 Mbyte, gzipped) is still available, but it does
not include the many changes made in version 5.0.
PGPLOT is distributed with subroutine interfaces for C and Fortran-77; these
interfaces can also be used with C++ and Fortran-90.
Several users have contributed bindings for PGPLOT that allow the PGPLOT
functions to be called from other languages. Several of these bindings allow
PGPLOT to be used interactively.
- ADA
- Martin Stift has
an ADA and ADA95
interface to PGPLOT.
- GLISH
- A PGPLOT binding for GLISH has been developed as
part of the aips++ project by a consortium led by the National
Radio Astronomy Observatory; it is currently in beta release.. For
details, see the aips++ web
page.
- OCTAVE
- PGPLOT may be called from the Octave language for numerical computations via Matwrap from Gary Holt.
- PERL
- PGPERL by Karl
Glazebrook provides an interface between the Perl language and the
PGPLOT FORTRAN library. For further information, see the WWW page
http://www.aao.gov.au/local/www/kgb/pgperl/
.
- PYTHON
- Nick Patavalis (npat@ariadne.di.uoa.gr)
of the University of Athens has developed an interface between PGPLOT
and the Python and NumPy languages. See http://ariadne.di.uoa.gr/ppgplot.
Scott Ransom (ransom@cfa.harvard.edu) has written another wrapper layer that
simplifies use of this interface. See ftp://cfa-ftp.harvard.edu/pub/ransom/.
- TCL/TK
- Tcl/Tk interfaces for PGPLOT have been developed by
three groups:
- Nick Elias
of the US Naval Observatory has released ptcl,
a package that registers PGPLOT functions as Tcl commands.
Information is available at
http://www.InfoMagic.com/~nme2/ptcl/ptcl.html. ptcl has been ported to
OpenVMS by Gilles Ratel.
- The Sloan Digital
Sky Survey project has developed a Tcl interface to PGPLOT
as part of its DERVISH package. See the
Dervish
Home Page for a description of the interface
(under ``Plotting'').
For more information contact
Eileen Berman.
- PGTK
by Brian Toby. This includes a driver for a Tk canvas widget.
The driver tkdriv distributed with PGPLOT is more powerful and is recommended for people using
a Unix X-window system.
- YORICK
- A PGPLOT interface to the Yorick
language has been written by Alexey Goldin (alexey@oddjob.uchicago.edu). See
http://flight.uchicago.edu/goldin/yorick-pgplot/.
The following list does not include the many application-specific
programs that have been written using PGPLOT.
- BUTTON by N. Cardiel and J. Gorgas of the Universidad Complutense de Madrid is a package of subroutines to facilitate the creation of interactive Fortran programs using graphics buttons. For further information, see the WWW page http://www.ucm.es/OTROS/Astrof/button/button.html.
- GENPLOT by Dale Gary.
- PGXTAL. Devinder Sivia has written
some 3D plotting routines for use with PGPLOT. For details, see http://www.isis.rl.ac.uk/dataanalysis/dsplot/. This
package makes use of undocumented internal features of PGPLOT
(something I strongly counsel against) and may not work with all
versions of PGPLOT.
- PLOTDAT, by Vincent Jacobs (vjacobs@physics.rutgers.edu, is fully interactive and
features legends, three dimensional histograms, an "echo" scripting
mechanism, parsing to add Greek or other "fancy" characters to plots,
and extensive online help. Please visit the site:
http://www.physics.rutgers.edu/~vjacobs/PLOTDAT/plotdat.html.
- PONGO by Paul Harrison. This is supported by Starlink: see
http://star-www.rl.ac.uk/
.
Starlink also maintains a version of PGPLOT
layered on the GKS library.
- QDP/PLT by Allyn Tennant. PLT is an
interactive plotting and fitting subroutine layered on PGPLOT, and QDP
provides a command interface to this routine. QDP/PLT is used by some
tasks within the FTOOLS
package available from the NASA Laboratory for High Energy
Astrophysics.
- STAP by Mingsheng
Han. STAP is an interactive command driven statistic and plotting program:
for information, see http://www.astro.wisc.edu/~han/stap/stap.html.
- TVB by Georges
GONCZI (Observatoire de Nice, France) is a semi-interactive
tool which gives access to the whole graphic possibilities
of PGPLOT without having to learn it and without having
to know any special language. See
http://www.obs-nice.fr/tvb/tvb.html
.
- WIP by James
Morgan. WIP is an interactive package with a simple to use
interface designed to produce high quality graphical output. WIP was
developed as part of the Berkeley-Illinois-Maryland Association (BIMA)
project. For further information, see the WWW page
http://bima.astro.umd.edu/bima/wip/wip.html
.
If you have questions about PGPLOT, please send them to Tim Pearson,
preferably by e-mail to tjp·astro.caltech.edu (use @ in place of ·), or by
FAX to +1 (626) 568-9352. If you have a problem with installation,
please include information about your operating system version,
Fortran and C compilers, and the version of PGPLOT you are trying to
install. If you think you have found a bug in PGPLOT, a simple
test program in Fortran or C that demonstrates the problem is very
helpful. I maintain a mailing list for announcements about PGPLOT, and
I will add your name to the list if you send me your e-mail
address.
Tim Pearson, California Institute of Technology,
tjp@astro.caltech.edu
Copyright © 1995-7 California Institute of Technology