Xgraph is 2-D plotting tool, originally written by David Harrison while at UC Berkeley. Pxgraph is based on xgraph, with a few extensions.

Xgraph resources

  • ftp://ptolemy.eecs.berkeley.edu/pub/misc/pxgraph/index.html - The pxgraph website, which includes the latest release and any other information.
  • Ptplot - A Java implementation of pxgraph.
  • Ptolemy User's manual Pxgraph chapter
  • tkgraph - A Tk interface that creates a new wish that uses the C functions in xgraph

  • Installing Pxgraph

    1. To install Pxgraph, you need a compiler and X11 include files and libraries. Pxgraph has been compiled under X11R6. It formerly compiled under X11R4 and X11R5, but it has not recently been compiled under those releases.
    2. Pxgraph uses the GNU autoconf program for configuration. To configure pxgraph, type:
      To get help with configure, type:
      configure --help
    3. To build, type:
    4. To install, type:
      make install

    Differences between pxgraph and xgraph

  • -binary option, added by Joe Buck. The -binary argument is the primary difference between xgraph and pxgraph. The Ptolemy Project software makes extensive use of -binary.
    The plot commands are encoded as single characters, and the numeric data is a 4 byte float.
    The commands are encoded as follows:
    d <4byte float> <4byte float>
    Draw a X,Y point
    End of dataset
    n <dataset name>\n
    New dataset name, ends in \n
    m <4byte float> <4byte float>
    Move to a X,Y point.

    To view a binary plot file under unix, we can use the od command. Note that the first character is a d followed by eight bytes of data consisting of two floats of four bytes.
    cxh@carson 324% od -c data/integrator1.plt
    0000000   d  \0  \0  \0  \0  \0  \0  \0  \0   d   ? 200  \0  \0   ? 200
    0000020  \0  \0   d   @  \0  \0  \0   @   , 314 315   d   @   @  \0  \0
  • MIF (Maker Interchange Format) output, added by Edward A. Lee MIF is an input format compatible with Framemaker.
  • pxgraph now builds with GNU autoconf. Parts of configure.in and Makefile.in are based on files from SunScript's Tk8.0.
  • pxgraph compiles on ansi and non-ansi compliant compilers.
  • pxgraph has been compiled on:
  • HPUX 10.20
  • Solaris 2.5.1
  • SunOS4.1.3
  • pxgraph should compile on any modern Unix.
  • Various bug fixes have been made to pxgraph.

  • Last updated: 12/04/97.