Jgraph -- A Filter for Plotting Graphs in Postscript
James S. Plank, University of Tennessee.
Original Code: November, 1992.
Latest Revision (8.5): November, 2017.
If You Use Jgraph
Please send me a brief email (email@example.com)
with your name and affiliation.
Documentation of usage of my open-source code is always a
good thing for department heads,
deans and funding agencies.
Jgraph is a program that takes the description of a graph or graphs as
input, and produces a postscript file on the standard output. Jgraph is
ideal for plotting any mixture of scatter point graphs, line graphs,
and/or bar graphs, and embedding the output into LaTeX, or any other
text processing system that can read postscript.
The Software (version 8.5)
Jgraph is an interesting case study in old code.
You can get the tar file at
- I posted it in November, 1992, and it is written in a very old-school C fashion.
- It remained unchanged for 19 years and 11 months, until some C compilers would not accept it.
So, I did a round of revisions to suppress warnings and make the compilers accept it.
No functional changes or even bug fixes. Version 8.4 was posted in October, 2012.
- We have another compiler change -- this time not accepting the old-school C habit of
not giving types to void procedures. So, we now have revision 8.5, in November of 2017,
where all void procedures are actually voids. I find it interesting (as of writing this
in November, 2017) that a piece of C code that has been completely functional for 25 years
has had to be revised twice now, not because the code is incorrect, but because the
compiler-writers change the definition of the language. I know I sound petulant, but there
you have it.
A set of more complex jgraph examples is available in
Jgraph is currently part of the
and the SAL
(Scientific Applications on Linux) software repositories.
Other interesting files
Jgraph lecture notes -- easier to read than the man page, so I've
The gif files were created with jgrtoppm (below).
- The Jgraph README file
- A typical scatter graph: Input,
- A typical bar graph: Input,
- A nice bar graph: Input,
- An amazing bar graph (made by Dave Wortman):
- A graph with custom axes (made by Matt Blaze):
- A structured drawing (made by
- The Jgraph USA-Today mock-graph:
- The Jgraph football field slide:
- Jgraph Overhead Slide #1 (embedded ps map of US):
- Jgraph Overhead Slide #2 (typical slide):
- Jgraph Overhead Slide #3 (bar graphs):
- Jgraph Overhead Slide #4 (structured drawing):
- Jgraph Overhead Slide #5 (made by Dave Wortman):
- Jgraph Overhead Slide #6 (structured drawing -- 105K):
- ctojgr -- A handy shell script to convert ascii text
files to jgraphs. E.g. Input,
Output of ctojgr,
Output of jgraph.
- Shell scripts that use ghostscript to convert jgraph files to
pnm (ppm, pgm, pbm) files. You can then use xv or
ppmtogif to convert the pnm files to gif files:
- The srm series (jgraph pictures of a "typical" computer -- varying
colors). Make an eps file out of them and include them in
drawings as an eps mark (see overhead #6 above for example use):
White (use on black),
- Disks --
White on black,
Black on white.
- Red Heart.
- Brief notes on an NT port, by C.M. Procter.
``Jgraph -- A Filter for Plotting Graphs in
PostScript'', Conference Proceedings, Usenix Winter 1993
Technical Conference, San Diego, CA, January, 1993, pp 63--68.