PLOTXY

Program graphs of functions F(x,y) of two variables. Parts of it stem from the sixties, and the user-friendliness reminds of those days. This program leans quite a bit on the works of L.M. Taff and J. Kraak and some contributors whose names have been lost.


the command line: plotxy datafile

On the commandline you have to specify the datafile you want to process, e.g.

 plotxy si110.fla

This can be an ascii file, see below, or a flux output file. If the filename is left out the input is taken from the input stream.


input

When the program starts it asks for:

 PostScript file: the output file, will be rewritten if existent.
 One of the letters A/F/V/C/X (Ascii/Flux/Vfinal/Coord/Xcoord)
  A: input is an ascii file containing NX * NY numbers, F(I,J)
     (F(I,J), I=1,NX),J=1,NY) (x is the fastest varying coordinate)
  F: input is a hexadecimal flux outputfile, and the flux distribution
     is wanted
  V: input is a hexadecimal flux outputfile, and the velocity
     distribution is wanted
  C: input is an ascii file specifying events to be sorted into
     a distribution F(I,J).
     The input file consists of numbers arranged in columns per line.
     Two of these columns represent the x- and y-coordinates
     respectively.
     The data are sorted as z(x,y), where the width and the values
     associated with x- and y-bins depend on input parameters NX,NY,
     x-min, x-max, y-min, y-max. z(x,y) is the number of events in
     each bin.
     Lines beginning with # are skipped
     Optionally one can select lines starting with a search string,
     e.g. 'exit'.
  X: input is an ascii file specifying events to be sorted, as
     produced by FLUX option EXITCOORD. It is similar to option 'C',
     except for some processing of the raw data.
     The search string is always the word 'exit'.
     Column 1 (event number) can not be accessed.
     Columns 2 and 3 (x and y) are incremented by their offsets.
     Columns 4 and 5 (px and py) are incremented by their offsets,
       converted to angles th_x and th_y, to the yz and zx plane,
       repectively, and expressed in degrees.
     Column 6 is the energy loss in keV as in the raw data.
     For angles < 15 deg there is not much difference between px,py
     and th_x,th_y, and one may use option 'C' as well.

The following input depends somewhat on which of these options was chosen.

  Normal/Log type N for normal or L for logarithmic graphs
  NX,NY: number of bins for X and Y (not needed for options F and V)
  specific for option C:
   search string (see above. Type an empty line if not applicable)
   x-column y-column (specify which 2 columns to use)
   x_min, x_max, y_min, y_max : range of the numbers in these columns
   (numbers outside these ranges will be put at the borders)
   Here x and y are the horizontal and vertical coordinates
  specific for option X:
   x-column y-column (specify which 2 columns to use)
   These should be from the set 2=x, 3=y, 4=th_x, 5=th_y, 6=dE
   x_min, x_max, y_min, y_max : range of the numbers in these columns
   (numbers outside these ranges will be put at the borders)
   Here x and y are the horizontal and vertical coordinates

In all cases input data are now obtained and the program types the 'menu':

1,2=CONTOUR,3=GRAY,4=3D,5=NUMTXT,6=SMOOT,7=SUM,8=DMP,>8=SKP

Choose by typing an integer, called N below. The program returns to this point after a job. Option N = 0 (not listed) stops the program.

Option N > 8 cause new input to be read, skipping N-9 records. (exception: in the case C the file is rewound, allowing different columns to be selected).

You should first give option 5 if you want nice labels etc

option 5: NUMTXT

 XMIN,XMAX,YMIN,YMAX
  give the values to be used for axis labeling, i.e. the values
  corresponding to I=0, I=NX, J=0, J=NY.
 TEXT FOR X-AXIS, TEXT FOR Y-AXIS, TOP label (3 lines)
  The program asks 3 lines of text that you will see back in the graphs.
 The same scale for X and Y axes? (0=N0, 1=YES):
  If you type 1, the contour and gray scale plots will be scaled so
  that x and y have the same number of units per cm.
  This is all right if x and y are both angles or lengths and have
  the same dimension.
  If you type 0, the plot will fill as much of the screen as possible.

option 1: CONTOUR

  INL,ZMIN,DZ,NLABEL
   INL = number of contour levels (max value is 10, see however opt 2)
   ZMIN, DZ : start level, and increment
   NLABEL   : write numeric labels every NLABEL intervals
              NLABEL=0: no labels

option 2: CONTOUR in the same plotframe

   input as above. Can be used to put more contours in a previous
   contour plot, or to add contours to a gray scale plot

option 3: GRAY SCALE PLOT

  ZMIN, ZMAX : two values corresponding to the minimum and
               maximum brightness. It is allowed to have ZMIN > ZMAX.
               Then the highest intensity is the darkest, which is
               useful for output to printers.

option 4: 3-D plot

  HITE,ANGLA,ANGLB,XLEN,YLEN
  HITE : I usually type 10000 or -10000 here (0 may also be useful).
         for other options see program source
  ANGLA: rotation around the Z axis
  ANGLB: viewing angle; 0 = frontview, 90 = topview
         useful values are mostly between 30 and 70
  XLEN, YLEN: size of the box in which the result is displayed
         values of 100 to 150 will usually do.
         If you give minus the value the x or y surface lines
         are omitted. This is sometimes useful.
  ZMIN,ZMAX,TIX,TIY,TIZ: (not asked if abs(HITE) < 10000)
         ZMIN, ZMAX: min and max values to be displayed
         (ZMAX=0: autoscaling)
         TIX,TIY,TIZ: distance between tic marks on the scales
         (TIX and TIY in array units).
  ANGLP, X0, Y0, Z0: (only if HITE < 0)
         ANGLP: amount of perspectivic distortion
                don't make larger then a few degrees
         X0, Y0, Z0: viewers position (X0, Y0 in array units)
  MX0,MY0,NX1,NY1: (only if HITE < 0)
         allow a subset of the data to be plotted.
         MX0, MY0 first point (in array units)
         NX1, NY1 number of points in x- and y-direction
         (default is 1 1 NX NY)

option 6: smooth

        The data are smoothed. Each datapoint is averaged with its
        neighbours. Like with all smoothing procedures the
        penalty is loss of resolution. However in most cases a
        mild smoothing (give option 6 once or twice) works
        quite well.

option 7: SUM

    suboptions:
       1) SUM over X. Displays Z(Y), summed over X
       2) SUM over Y. Displays Z(X), summed over Y
       3) Reflect X
       4) Reflect Y
          Reflect the distribution with respect to a line of
          constant x or constant y, respectively.
       Options 1 and 2 leave the distribution F(x,y) unaffected,
       but 3 and 4 modify it.

option 8: DMP

   writes out the distribution (F(I,J), I=1,NX),J=1,NY) in ASCII
   format to logical unit 15. The filename is system dependent.
   Look for something like 'ftn15'.


FILE THIS PLOT? (0=NO):

   Answer with a non-zero number if you want the previous
   graph to be written to the plot file.