next up previous contents index
Next: Using ASGL Up: User's Guide Previous: User's Guide   Contents   Index

Subsections

Introduction

What is ASGL?

Purpose:
Easy creation of PostScript files containing scientific plots.

Capabilities:

Use:

ASGL is used via a steering file. A steering file contains commands specialized for creation of plots. This file is interpreted by TOP which then calls appropriate Fortran subroutines to create the PostScript output file. See Chapter 4 for description of TOP.

Using ASGL with the TOP steering file

The ASGL program is run by:

asgl job

where job is the root of the steering file -- the actual steering file must have an extension .top. By default, the output of the program is then written to the job.ps file that can be printed on the PostScript printer, previewed with a PostScript previewer, modified, or included in other documents, such as TEX files.

ASGL reads PostScript definitions of line types, font types and symbols from text file src/psgl1.ini. This file can be edited to extend the capabilities of ASGL. For example, line widths, grayness, dash-dot combinations, font types and sizes, symbol types and sizes can be customized in this way.

There are four coordinate systems (or windows) used by ASGL. The Base PostScript system corresponds to the PostScript device and has the Bounding Box (0,0,612,792). The Paper coordinate system is used to specify the Bounding Box and its orientation of the window on the paper that will contain the plot. It overlaps with the Base PostScript system except that it uses cm; its Bounding Box is (0,0,21.59,27.94). The World coordinate system is defined by the data to be plotted. It overlaps with the window specified in the Paper coordinate system. The Plot coordinate system is used for creating the plot. The origin of the Plot coordinate system is always (0,0), XMAX is always 1, and YMAX is such that it retains the X/Y aspect of the Paper coordinate system. It overlaps with the window specified in the Paper and World coordinate systems.

Probably the easiest way to use ASGL is to take an example TOP file from examples sub-directory that is closest to what you need and edit it to suit your requirements exactly. The example TOP files and their output are given in Chapter 3.

A complete list of ASGL commands is given in Chapter 2.

ASGL installation

                               INSTALLATION


                                ASGL 1.3.1

                           PostScript Plotting
                                                  v
                    Copyright(c) 1989-2003 Andrej Sali
                            All Rights Reserved





Supported computers:

ASGL 1.3.1 runs on Silicon Graphics Iris 4D, Convex C2, Sun 4,
IBM RS/6000, DEC Decstation, DEC Alpha station, Linux boxes, and
compiles with the public domain f2c fortran-to-c translator. To obtain
f2c, use the anonymous ftp service on research.att.com. Its IP address
is 192.20.225.2; login with the username `netlib'. The f2c translator
allows ASGL to run on virtually any UNIX computer.




Installation:


- If you have asgl-1.3.1-1.src.rpm, and are on a RedHat Linux (or similar)
  system, the following should generate a binary RPM from the source:
     rpmbuild --rebuild asgl-1.3.1-1.src.rpm
  (You may have to run this as root.)


- If you have asgl-1.3.1-1.i386.rpm (e.g. built from the .src.rpm, above)
  then the following should install it (run as root):
     rpm -ivh asgl-1.3.1-1.i386.rpm


- If you have the asgl-1.3.1.tar.gz distribution file:

  1) Unpack the distribution file:

     zcat asgl-1.3.1.tar.gz | tar xvf -

     The result will be a directory ./asgl-1.3.1


  2) Make sure the ASGL_EXECUTABLE_TYPE environment variable is defined
     for your architecture (see scripts/Makefile.include1 for a list):

             for sh :  ASGL_EXECUTABLE_TYPE=g77; export ASGL_EXECUTABLE_TYPE

             for csh:  setenv ASGL_EXECUTABLE_TYPE g77


        (These commands could also be put in your login script.)


  3) Set the environment variable ASGLINSTALL to the directory where you
     want to have ASGL installed. Create this directory. For example,
     for the tcsh or csh shells:

     setenv ASGLINSTALL /usr/local/bin
     mkdir $ASGLINSTALL


  4) Compile and install the program:

     make all; make install

     If you are not using one of the compilers listed above
     you will probably have to modify the Makefile in the
     src/ sub-directory. Hopefully, you won't have to modify
     the fortran code.


  5) Change your login script to include the following (for csh or tcsh):

     # Root directory for installed ASGL:
     setenv ASGLINSTALL /usr/local/bin/asgl

     # ASGL executable type
     setenv ASGL_EXECUTABLE_TYPE g77

     # Set ASGL environment variables and update the command path:
     if (-e $ASGLINSTALL/setasgl) source $ASGLINSTALL/setasgl


  6) Source your login script. You can now start using ASGL. See
     the examples in the examples/ directory. You may (but do not
     have to) delete the ASGL distribution directory.


  7) To make and install the documentation, once ASGL is installed,
     run the following in the ASGL distribution directory:

     make installman

     In order to create the document, 'collect' must be built from
     'collect.f' in the doc/ directory. You may have to do this
     manually if the Makefile is unable to do it automatically
     (it uses 'f77 collect.f -o collect').


  8) The `hosttype mechanism' allows transparent ASGL installation
     and use of the same installation directory on some networks of
     different host types. For example, at Harvard we have an NFS
     and Yellow Pages network with only one home directory per user
     for almost all the machine types listed above. In such a case,
     to install ASGL on another host type in the same directory,
     you only have to login to that host, clean the distribution
     directory by `make distclean' and do `make all' again. Exactly
     the same commands (scripts) are used on all hosts to run the
     ASGL programs.


next up previous contents index
Next: Using ASGL Up: User's Guide Previous: User's Guide   Contents   Index
Ben Webb 2003-10-09