Installing and using PGPLOT 5.2 on Red Hat 6.0 Linux ==================================================== (valid for Red Hat 6.1 too) Use the new RedHat supplied Fortran version: rpm -qf /usr/bin/f77 should give: egcs-g77-1.1.2-12 or 'close enough'. Installation (copy and paste into a shell) ------------------------------------------ Unpack tar.gz file into a temorary directory (e.g. ~/TEMP_INSTALL/PGPLOT) mkdir ~/TEMP_INSTALL/PGPLOT/ cp pgplot5.2.tar.gz ~/TEMP_INSTALL/PGPLOT gzip -d ~/TEMP_INSTALL/PGPLOT/pgplot*.tar.gz cd ~/TEMP_INSTALL/PGPLOT tar xvf pgplot*.tar set SOURCE = ~/TEMP_INSTALL/PGPLOT/pgplot Choose a destination (TARGET) directory for the installation: set TARGET = /usr/local/pgplot or maybe, for a personal installation: set TARGET = ~/pgplot mkdir $TARGET cp $SOURCE/drivers.list $TARGET/drivers.list cd $TARGET Edit the drivers.list file there (remove the beginning '!' from selected lines) and chose these at least: GIDRIV 1 /GIF GIF-format file, landscape GIDRIV 2 /VGIF GIF-format file, portrait LXDRIV 0 /LATEX LaTeX picture environment 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 XWDRIV 1 /XWINDOW Workstations running X Window System C XWDRIV 2 /XSERVE Persistent window on X Window System C cd $SOURCE/sys_linux Edit the file g77_elf.conf so that the line with 'LIBS' looks like this: LIBS="-L/usr/X11R6/lib -lX11" cd $TARGET Call makemake from $SOURCE, with increasing number of args (just for checking) (only the last command counts) $SOURCE/makemake $SOURCE/makemake $SOURCE $SOURCE/makemake $SOURCE linux $SOURCE/makemake $SOURCE linux g77_elf Still from $TARGET, do the proper compilation (ignore a few warnings) make make clean make pgplot.html make cpg If it's a system-wide installation you may have to set the appropriate permissions (not needed for a personal installation): chmod 755 $TARGET chmod og+rx $TARGET/*pgdemo* chmod og+rx $TARGET/pgxwin_server chmod og+rx $TARGET/pgbind chmod og+r $TARGET/* Before running the demos, set the following variables in your .cshrc file and source the file. For the system-wide installation: setenv PGPLOT_DIR /usr/local/pgplot setenv PGPLOT_DEV /xwin setenv LD_LIBRARY_PATH /usr/local/pgplot:$LD_LIBRARY_PATH setenv PGPLOT_FONT /usr/local/pgplot/grfont.dat set path=($path /usr/local/pgplot) For personal installations: setenv PGPLOT_DIR ~/pgplot setenv PGPLOT_DEV /xwin setenv LD_LIBRARY_PATH ~/pgplot:$LD_LIBRARY_PATH setenv PGPLOT_FONT ~/pgplot/grfont.dat set path=($path ~/pgplot) Run demos (notice whether you have subscripts, Greek fonts) pgdemo1 pgdemo2 ... cpgdemo Compiling your own programs (with the system-wide installation) --------------------------------------------------------------- To compile a FORTRAN programme use either f77 or g77 (In RedHat 6.0 f77 is in fact a link to g77) f77 pgdemo4.f -lpgplot -lX11 -L/usr/X11R6/lib -L/usr/local/pgplot Warning: the compiler is picky about the order of switches. To compile a C programme, follow these 2 steps: (you need to have cpgplot.h in /usr/local/pgplot, check) gcc -c -I/usr/local/pgplot cpgdemo.c f77 cpgdemo.o -L/usr/local/pgplot -lcpgplot -lpgplot -lX11 -L/usr/X11R6/lib ---- Fanel Donea, 09/05/2000, 19/04/2001 fdonea@yahoo.com