PGPLOT is a Fortran graphics library for scientific data display.
Many programs in this repository make use of PGPLOT either directly in Fortran
or through the C++ API libpgplotxx.
PGPLOT supports output to many different devices, including interactive screen plots as well as Postscript files.
In the early days PGPLOT was attractive in particular due to his ability to produce interactive screen plots from Fortran 77 on Tektronix terminals (well, this is history: http://en.wikipedia.org/wiki/Tektronix_4010).
gfortran_gcc_64.conf uses path names lib64 to refer to X11
and TK libraries (this is necessary on 64bit systems to links against the
64bit version of the binary library instead of the 32bit version).
Edit the files to match your system configuration
Create the library directory
mkdir -pv ~/repo/pgplot/linuxgfortran
We call this the ''installation directory''.
This will be the initial place for the readily compiled binary libraries, binary executables, font files, and documentation.
Any other directory name or path for the ''installation directory'' will do as well, just use its name consistently throughout the installation process.
Change your working directory to the ''installation directory'':
Copy driver list from the ''source-code directory'' to the ''installation directory'':
Activate drivers by removing exclamation mark in first column for the following drivers in the copy of drivers.list:
NUDRIV 0 /NULL Null device (no output) Std F77 PSDRIV 1 /PS PostScript printers, monochrome, landscape Std F77 PSDRIV 2 /VPS Postscript printers, monochrome, portrait Std F77 PSDRIV 3 /CPS PostScript printers, color, landscape Std F77 PSDRIV 4 /VCPS PostScript printers, color, portrait Std F77 TTDRIV 5 /XTERM XTERM Tektronix terminal emulator Std F77 XWDRIV 1 /XWINDOW Workstations running X Window System C XWDRIV 2 /XSERVE Persistent window on X Window System C
Further drivers may be activated but some of them require special prerequisites.
See comments in the ''source-code directory'' for details.
~/repo/pgplot/pgplot5.2.2/makemake ~/repo/pgplot/pgplot5.2.2 linux gfortran_gcc
Use different option if required by your system (like gfortran_gcc_64).
This and the following steps have to be done with the ''installation directory'' being the current working directory!
If you miss to do so and for example issue the commands in the ''source-code directory'' the installation apparently will procede, but will be incomplete at the end.
Call make to compile Fortran library.
Edit ~/repo/pgplot/pgplot5.2.2/makehtml to use correct path to perl binary.
You may use any other path alterantively to ~/repo/pgplot/pgplot5.2.2
for ''source-code directory'' and
~/repo/pgplot/linuxgfortran for the ''installation directory'',
Just adjust all path names in the above commands consistently.
For more details see install-unix.txt and other files in the ''source-code directory''.
At least two environment variables
(PGPLOT_DIR and TF_LINK_PGPLOT)
must be set appropriately to use PGPLOT together with source code from the Seitosh repository.
See also README.compile.
A template bashrc is provided in
This variable contains the path of the PGPLOT ''installation directory''.
This variable is required to pass the location of the binary library to the
linker and the location of the pgxwin_server binary executable as well
as the location of the font file to the programs at run-time.
See also the last item in the quick installation guide above.
This variable is required for all programs making use of graphical output
through the PGPLOT library. It is passed to the linker in cases where
binaries have to be linked against PGPLOT. Use this variable to pass the
location of your X11 libraries as well as the names of additional
libraries that might be needed for the PGPLOT drivers in your installation
(like libpng.a by adding -lpng for example).
In case you are in doubt regaring additional libraries, the makefile in
your PGPLOT installation directory can be helpful. The variable PGPLOT_LIB
in the makefile contains settings required in TF_LINK_PGPLOT too.
TF_LINK_PGPLOT should additionally contain the X11 library (variable LIBS
in the PGPLOT makefile) and the path to your PGPLOT installation
directory (as provided by variable PGPLOT_DIR).
This variable is required when C or C++ programs must be linked against
Fortran libraries. It defines the linker option for interlanguage linking.
If you use g77, you will have to link against libg2c.a here (use -lg2c
then instead of -lgfortran).
Since PGPLOT is a Fortran library, this variable is used wherever a C oder C++ program uses PGPLOT.
PGPLOT driver configuration
PGPLOT comes with many different drivers to produce graphics on screen or in a file.
These drivers can be configured.
The collection of drivers is documented at
Some general configurations options can be selected through environment variables.
Some of these settings are prepared in
These variables tell PGPLOT how big an image to produce. The defaults are appropriate for 8.5 x 11-inch paper. The maximum dimensions of a PGPLOT image are WIDTH by HEIGHT, with the lower left corner offset by HOFFSET horizontally and VOFFSET vertically from the lower left corner of the paper. The units are milli-inches. The ``top'' of the paper is the edge that comes out of the printer first.
If this variable is defined (with any value), the user name, date and time are written in the bottom right corner of each page.
If you want to get rid of the ident marker in the bottom right corner you have to issue
in your shell before prior to calling the plot program.
Normally, PGPLOT computes the bounding box for the entire plot (the smallest
rectangle that includes all the graphics) as it creates the PostScript file,
and writes this information in a %%BoundingBox comment in the file trailer.
Some programs that read encapsulated PostScript files expect to find the
%%BoundingBox comment in the file header, not the trailer, and may not
display the plot correctly. To fix this problem, you may need to move the
comment from the trailer to the header with a text editor or special program.
Alternatively, you can define PGPLOT_PS_BBOX = MAX. This tells PGPLOT to put
a %%BoundingBox comment in the header of the PostScript file; the bounding
box is one which encompasses the whole plottable area, not a minimal one,
because PGPLOT does not know the correct bounding box until it has finished
writing the file.
If this variable is set, the bounding box (the smallest rectangle that includes all the graphics) is drawn on each page.
If this variable is set, the text of each plotted character string is included
in the PostScript file as a comment before the sequence of vectors that
represents the string. This makes the file slightly larger, but it can be
useful if you want to edit the PostScript file.
Normally the output file does not contain special end-of-file characters. But
if environment variable PGPLOT_PS_EOF is defined (with any value) PGPLOT
writes a control-D job-separator character at the beginning and at the end
of the file. This is appropriate for Apple LaserWriters using the serial
interface, but it may not be appropriate for other PostScript devices.
Specify NO to suppress use of a PostScript font for the graph markers; markers
are then emulated by line-drawing. If this option is not requested, PGPLOT
graph markers are scaled geometrically with the character-height attribute and
the line-width attribute is ignored. This is different from most of the other
drivers, where the line-width used for markers is set by the line-width
attribute rather than the character-height attribute. Requesting this option
makes the PostScript driver behave like the other drivers, but it also makes
the PostScript files larger.