# PGPLOT

Descriptions of the Pgplot subroutines are available here.

A complete user's manual for pgplot is available at the main website, http://www.astro.caltech.edu/~tjp/pgplot

Before running any PGPLOT program, you must ensure that the environment variable PGPLOT_DIR is correctly defined. This is the name of the directory in which PGPLOT will look for the files grfont.dat and rgb.txt (unless environment variables PGPLOT_FONT and PGPLOT_RGB are defined).

PGPLOT has been compiled for both 32-bit (x86) and 64-bit (x86_64) systems, With slightly different installation locations for each one. The correct location should automatically be set at login. The correct locations are:

• 32-bit: /usr/local/pgplot/x86/gcc-4.1.2
• 64-bit: /usr/local/pgplot/x86_64/gcc-4.1.2

Notice that there is a subdirectory indicating that PGPLOT was compiled using GCC 4.1.2. This because it has Fortran libraries that may not be compatible between different Fortran compilers. If you are trying to link to PGPLOT using a fortran compiler other than gfortran and having difficulty, please contact SNS computing for assistance.

### Defining A Plot Device

It is convenient, but not essential, to define a default PGPLOT device with environment variable PGPLOT_DEV, e.g.

Under csh/tcsh

% setenv PGPLOT_DEV /xterm


or, under bash

% export PGPLOT_DEV=/xterm


PGPLOT_DEV is NOT defined automatically.

When using the shared library libpgplot.so, use the -L flag at compile time, e.g.
gfortran  -L/usr/local/pgplot/x86_64/gcc-4.1.2/libpgplot.so example.f

One could also add the PGPLOT_DIR directory to the environment variable LD_LIBRARY_PATH.