
1 GLE

  CGLE is a graphics package. A file of simple commands is used to 
  draw a picture, for help on the editor and keyboard keys type
  in EDIT, for help on drawing graphs type in GRAPH and for 
  help on gle commands type in COM.

  To try out some of the examples:
	  Press F3 to load a file
	  Press F10 to draw the picture
	  Press ESC (or ^Z, or ^X) to get back to the GLE editor.

2 Edit

   You are in a simple screen editor, use the arrow keys to edit the 
   file and then press F2 to save the file and F10 to run gle and display
   the graph. Use F9 to enter the MENU system for defining a graph.

The editor understands the following keys.
^K  followed by the letter B for begin block,
			   Y to cut the block or
			   P to paste a block which you have previously cut.
^Y  Deletes current line (PF4 on VAX)           
^U  Undeletes current line
^Z  (or ESC) To shift up a level and to exit
^C  Quit                        (^E Calls VAX EDT on the VAX)
and the normal editing keys   
		  Delete,  Page up,  Page down







	If your terminal/PC lacks the normal function keys f1-f10
	then you can use GOLD (f1 or pf1) followed by 
		1 = Help
		2 = Save
		3 = Load
		4 = Saveas
		5 = Show Errors
		9 = Graph Menu/Form
		0 = Draw it  (or ^G)
	^Z = Exit from menu              (^S Shell to DOS)

2 Graph

   A graph should start with BEGIN GRAPH and end with END GRAPH.
   The data to be plotted are organised into datasets.
   A dataset consists of a series of (X,Y) coordinates,
   and has a name based on the letter "d" and a number between
   1 and 99,

   eg. "d1 or d4"

   The  name  dn  can  be  used  to  define  a  default for all
    datasets.  Many  graph commands described below start with d
   n.  This  would  normally  be replaced by a specific dataset
   number e.g.,

	  d3 marker diamond

   Up to 99 datasets may be defined.

   For  each  xaxis  command  there  is  a corresponding yaxis,
   y2axis  and  x2axis  command  for  setting  the top left and
   right    hand   axes.  These  commands  are  not  explicitly
   mentioned in the following descriptions.

   Note: Some of the help on graph refers to the graph form menu (f9)

3 size

  Defines the size of the graph in cm.
  This is the size of the outside box of a graph.

  eg. "size 27 18" is the normal size specified for an A4 landscape page.
  That is 27cm wide and 18cm high.

  The actual size of the axes of the graph will be 70% of this.

3 nobox

  This specifies whether the graph is enclosed in an outside frame, with
  dimensions specified in your size command.

3 data
Specifies the name of a file to read data from.
A data file named xx.dat for two datasets looks like this (*=missing value):

     1  2.7   3
     2  5     *
     3  7.8   7
     4  9     4

A dataset consists of a series of (X,Y) coordinates, and has a name based on
the letter "d" and a number between 1 and 99, eg. "d1 or d4"

Specify the names of datasets that should be filled with data from the file.
eg. from the above file with 3 columns "data xx.dat d5 d6"
Dataset d5 would then contain           and d6 would contain
	 1   2.7                          1   3
	 2   5                            2   *
	 3   7.8                          3   7
	 4   9                            4   4




If your data file has missing values you will have gaps in the graph
unless use the nomissing parameter.
    ie. data xx.dat d6 nomissing

You may specify particular columns to read data from the file -
    eg. "data xx.data d1=c4,c1"
    This would produce a graph with x values from column 4 and y values
    from column 1 (ie. the reverse of the default)

If your dataset is too large to fit in memory (on the PC) you can 
specify a dataset to read it only when drawing it, in this way 
CGLE can cope with any sized dataset. eg. (d3 lstyle 2 bigfile "a.dat" )

3 position

   This sets the starting position for the graph.
   This is most often used when you wish to have more than one graph
   on a page.

   eg. "size 13.5  9"
       "amove 0  9"

  This produces a graph in the top left corner of an A4 landscape page.

3 fill

  Allows you to fill portions of the graph.
  You can fill in several different ways.

	"fill x1,d1"            Between the xaxis and a dataset.

	"fill d1,x2"            Between a dataset and the x2axis.

	"fill d1,d2"            Between two datasets.

	"fill d1"               For a closed dataset (eg. a circle)

  The fill intensity is from grey0 (white) to grey100 (black) 
  and steps of 10 in between.  
     - eg.   "fill x1,d1 color grey10"     
  Produces light grey shading between the xaxis and the dataset.




  The filled area can also be clipped to a region using 
  the xmin, xmax, ymin, ymax qualifiers.

     - eg.   "fill d1,d2 xmin 1 xmax 5 color blue"

  This sets the fill area between the 1 and the 5 values on the X axis.

4 xmin 
   Sets the minimum value for the fill (this acts as a clipping boundary)

4 ymin 
   Sets the minimum value for the fill (this acts as a clipping boundary)

4 xmax 
   Sets the maximum value for the fill (this acts as a clipping boundary)

4 ymax 
  Sets the maximum value for the fill (this acts as a clipping boundary)

3 bigfile
    See 
	graph dn bigfile

3 dn

  The two variations of the dataset command specify which datasets 
  to apply the keyword settings to, 
  eg. a specific dataset "d3" or all datasets "dn".
  
  The dn command line specifies that attributes are to be applied to all
  datasets.

  eg. "dn smooth"

  The d1 to d7 command lines specify that attributes are to be applied to 
  that specific dataset only.
  
  eg. "d3 lstyle 2 color blue"

4 bigfile

	d2 bigfile "all.dat,1,2"

    The bigfile option allows a dataset to be read as it is drawn, 
    (rather than being completely read into memory before it is 
    drawn) this means that very large datasets can be drawn on a 
    PC without running out of memory. The axis minimum and maximum 
    must be specified (using the  command xaxis min max) unless
    the AUTOSCALE option is used, e.g. 
	d2 bigfile a.dat   autoscale

    By default the first two columns of the data file will
    be read in, but other columns may be specified.
    E.g., all.dat,3,2  would read x values from column 3 and y values 
    from column 2.  Or, to read the 4th dataset, specify   
    the file as all.dat,1,5
 
    If the x column is specified as '0' then GLE will generate the
    x data points. E.g., 1,2,3,4,5...
	
4 autoscale
	This tells gle to pre-read a bigfile so that it can autoscale
	the axes.  This may be much slower for a very large file but 
	is the only option if you require auto-scaling.

4 line

  This tells GLE to draw lines between the points of the dataset.  
  By default GLE will not draw lines or markers
  (You must specify one or other else you get a blank graph.)
  If your dataset has missing values GLE will not draw 
  a line to the next real value.
  It just leaves a gap in the curve unless you specify nomissing in
  the data command. (d3 line nomissing)

	     eg.  "d3 line"

4 lwidth

  Specifies the width of the line 
  This is measured in cm
  The default is .02 cm.


4 lstyle

  This specifies the line style for that dataset.
  There are 9 predefined linestyles 
	  eg.  1=solid line, 2=dot's, 3=dashes etc... 

  Numbers greater than 9 are read from left to right 
  with each digit being a length of black or white. 
	  eg. "d3 lstyle 1553"

4 marker

 Specifies the marker to be used for the dataset.
 There is a set of pre-defined markers (refer to Appendix A for examples)
 which can be specified by name (NOT by number). 
 Markers can also be a user defined subroutine.

       eg. "d2 marker circle" or "d1 marker triangle"

 Some of the markers have a prefix -

	   Prefix              Meaning
	     f                 Solid coloured marker
	     o                 A circle around the marker
	     w                 The hollow marker hides the graph line
	   (none)              The graph line is drawn through the marker





   No.  Marker-Name             No.  Marker-Name

   1   circle                   15  dag
   2   triangle                 16  ddag
   3   square                   17  asterix
   4   diamond                  18  oplus
   5   fcircle                  19  ominus
   6   ftriangle                20  otimes
   7   fsquare                  21  odot
   8   fdiamond                 22  trianglez
   9   dot                      23  diamondz
   10  cross                    24  wcircle
   11  club                     25  wtriangle
   12  heart                    26  wsquare
   13  star                     27 wdiamond
   14  snake

4 msize

   Increases or decreases the size of the marker for the specified
   dataset. The size is in cm.

	eg.  "d3 marker square msize .3"

4 smooth

  This will make GLE draw a smoothed line through the points.  
  You can now use markers and linestyles with the smooth command.

4 smoothm

  Same as smooth option, but this allows a function which has
  multiple y values for a single x value (e.g. a circle).

4 xmin

  These commands map your dataset onto the graph's boundaries. 
  Your data will be drawn as if the X axis was labelled from XMIN to XMAX
  (regardless of how the axis is actually labelled).

  A point in your dataset at X=10 will appear on the left
  edge of the graph with the given command.
	     
	       "d3 line xmin 10 xmax 50"

4 ymin

 These commands map your dataset onto the graph's boundaries. 
 Your data will be drawn as if the Y axis was labelled from YMIN to YMAX
 (regardless of how the axis is actually labelled).

 A point in your dataset at Y=10 will appear on the bottom
 of the graph with the given command.

	      "d3 line ymin 10 ymax 50"

4 xmax

 These commands map your dataset onto the graph's boundaries. 
 Your data will be drawn as if the X axis was labelled from XMIN to XMAX
 (regardless of how the axis is actually labelled).
 A point in your dataset at X=50 will appear on the right
 edge of the graph with the given command.

	      "d3 line xmin 10 xmax 50"

4 ymax

 These commands map your dataset onto the graph's boundaries. 
 Your data will be drawn as if the Y axis was labelled from YMIN to YMAX
 (regardless of how the axis is actually labelled).

 A point in your dataset at Y=50 will appear on the top
 of the graph with the given command.
	    
	     "d3 line ymin 10 ymax 50"

4 err

  For drawing error bars on a graph the error bars can be specified as
	   - an absolute value,
	      eg. "d3 err .1"

	     a percentage of the y value
	     eg. "d3 err 10%"

	     or as a dataset.
	     eg. "d3 err d4"
	     - The dataset d4 would contain data specifying the 
	       relative offset (NOT the absolute value) for the
	       error bars. 

  The up and the down error bars can be specified separately.
	     eg. "d3 errup 10% errdown d2 
  
  The width of the bar can be specified.     
	     eg. "d3 err d1 errwidth .2"

  There is an identical set of commands for drawing horizontal 
  error bars:
	    herr, herrleft, herrright, herrwidth 

4 errwidth

   Specifies the width of error bars.
   Measured in cm.
 
4 key

    Specifies a title for that dataset.
    This will be used in an automatically generated KEY 
    which will be positioned at the top-left of the graph by default.

    The key command can specify other features of the key
     eg "key  pos <justify>   nobox   offset <exp> <exp>"

    There is a separate KEY module for more complex key's.

    Refer to chapter 4 of the manual for details.

4 color

	  Specifies the colour of the line used to draw that dataset.
	  Valid colours are black, white, red, green, blue,
			    cyan, magenta, yellow.
	  and grey10, grey20 ... grey90
	  The colours are implemented as shades of grey for monochrome
	  postscript output.  eg grey10 = yellow

3 let

  This command lets you generate a dataset.-

  Either from scratch,
			eg. let d1=sin(x) from 1 to 20 step .4

  or as a function of another dataset,
			eg. let d2=d1*3.

  When generating a dataset from scratch (ie not using another dataset
  as a base) you MUST specify FROM nn TO nn STEP nn. (NOTE THE SPACING)

  eg.  let d1 = sin(x) from 1 to 10 step .2
	let d2 = sqrt(d1)/3





	Maths Functions
	The functions available which can be used with the Let
	command are -

	Function              Returns
	ABS(exp)              absolute value of exp
	ATN(exp)              arctan
	COS(exp)              cosine
	EXP(exp)              exponent
	FIX(exp)              exponent rounded toward 0
	INT(exp)              integer
	LOG(exp)              Log to the base e of exponent
	LOG10(exp)            Log to the base 10 of exponent
	SGN(exp)               1 if exponent is positive
			      -1 if exponent is negative
	SIN(exp)              sine of exponent
	SQR(exp)              square of exponent
	SQRT(exp)             square root of exponent

3 bar
  This is a subcommand of the normal graph module.
  This allows you to mix line and bar graphs.
  The bar command is flexible but quite complex.
  Stacked, overlapped and grouped bars are possible.

  The simplest bar chart is drawn by the command - bar d1
  Double bars are produced by - bar d1 d2

  To produce bars with no gaps between set the width and dist settings to
  the same value. - bar d1 width .5 dist .5

  Overlapped bars are produced similarly. The width (of the bar) is set
  greater than the dist (distance between the bars).
  eg. - bar d1 d2 width 1 dist 1.75
   
  Stacked bars are produced by drawing a graph for a dataset with the
  starting points at the values of another dataset.  
	- eg.  bar d1 fill grey 90
	       bar d2 from d1 fill grey 20



   - or    bar d4 color black width 3
	   bar d1,d2,d3 from d4,d4,d4 color red green blue width 1 dist 1
     Without the first bar command for d4 the other bars 
     would appear floating in the air. The width and dist commands are 
     needed to produce the stacked bars without gaps on a base of equal
     size.

     3d Bar graphs can also be drawn, this doesn't show any more 
     information, but it does look nice:

	  bar d1    3d .5 .3    side red     top black
	or 
	  bar d1,d2  3d .5 .3  side red,green   notop
	  bar d3,d4  3d .5 .3  side red,green   top black,white 

     Take note of commas!!!.

4 3d
 bar d1   3d xunits yunits
	The 3d option tells GLE to draw bars with a side and top.  The
	two measurements give the vector used for the receding edge of 
	the bar.  They are normalized to the width of the bar.

5 notop
 bar d1   3d .5 .5  notop
	Stops GLE from drawing the top of a 3d bar, this should be used
	on the lower bar of a stacked bar graph.

5 side
 bar d1,d2   3d .5 .5    side blue,green
	Specifies colours for the sides of the bars in the group.
	
5 top
 bar d1,d2   3d .5 .5    side blue,green  top red,yellow
	Specifies colours for the tops of the bars in the group.

4 dist

Specifies the distance between bars in this group. 
The distance is measured from the left hand side of one bar
to the left hand side of the next bar. 
A distance of less than the width of a bar results in the bars overlapping. 
 eg.
      "bar d1,d2 dist .2"

4 from

This sets the starting point of each bar.
It is used for creating stacked bar charts.  
Each layer of the bar chart is done with an additional bar command.
  eg.
     bar d1,d2 from d3,d4

4 width

Sets the width of the bars.  eg. bar d1,d2 width .3 

4 fill

Sets the density and colour for the inside of each bar.
 eg. "bar d1,d2 fill green,grey20"

4 color

     Sets the colour of the outline box for each bar.
      eg. "bar d1,d2 color green,grey20"

     Valid colours are black, white, red, green, blue,
			    cyan, magenta, yellow.
	and grey10,grey20 ... grey90
     The colours are implemented as shades of grey for monochrome
     postscript output.  
       eg. grey10 = yellow

3 xaxis
     Axis commands allow you to control the appearance of graph axes.
     A graph has two X axes (XAXIS, X2AXIS) and two Y axes (YAXIS, Y2AXIS).
     The axis qualifiers that can be used are -
	color, font, hei, lwidth
	log, min, max, nofirst, nolast
	nticks, dticks, dsubticks, grid

     On the Y axis the qualifier rotate can be specified.
 By default the Yaxis is labelled -   s
				      i
				      x
				      a

 With rotate the Yaxis is labelled -  a
				      x
				      i
				      s
4 base

  This specifies a "rule of thumb" size in cm from which GLE
  can guestimate good sizes for character height, tick length etc.

4 hei

  Specifies the hei of the axis tick labelling in centimetres.


4 color

     Specifies the colour of the line used to draw that dataset.
     Valid colours are black, white, red, green, blue,
			    cyan, magenta, yellow.
	and grey10,grey20 ... grey90
     The colours are implemented as shades of grey for monochrome
     postscript output. 
      eg. grey10 = yellow

4 font

   Specifies the font that will be used for labelling the axis.
   Most fonts are available in standard, bold, italic, and bold/italic.
   There are 3 families of fonts - ps (postscript), tex and pl. 

     Name      Description

	rm        Roman
	rmb       Roman Bold
	rmi       Roman Italic
	ss        San Serif
	ssb       San Serif Bold
	ssi       San Serif Italic
	tt        Typewriter





	psagb     AvanteGarde-Book
	psbd      Bookman-demi
	psc       Courier
	psh       Helvetica
	psncsb    New Century Schoolbook
	pspr      Palatino Roman
	pstr      Times Roman
	pszcmi    ZapfChancery-MediumItalic

	texcmb    Computer Modern Bold
	texcmr    Computer Modern Roman
	texcmsy   Computer Modern Symbols
	
	plcc      Complex Cartographic
	plge      Gothic English
	plsg      Simple German
	plsym1    Symbols 1
	plsym2    Symbols 2
	plba      Block Ascii

   
   Refer to Appendix A.2 in the manual for a full listing of
   the fonts.

4 grid

  This will draw lines between the x and x2axes or the y and y2 axes.
  For a full grid turn the grid on for both axes.
  
4 scale

  Scales the height of the axis tick labelling.
  This means that if you enlarge the graph the lettering
  will enlarge automatically.  Whereas if you specify a HEI 
  it will be an absolute size

4 lwidth

Sets the width of the lines used to draw the axis and the ticks.


	 This is measured in cm
	 The default is .02cm

4 log

Specifies labels should be done in logarithmic style,
and that scaling of data should also be done logarithmically.

(warning: correctly speaking a long straight lines should
 become curved but will not unless you use the SMOOTH option)

4 min

Sets the minimum values on the xaxis.
This will determine both
	       the labelling of the axis
	       and the default mapping of data onto the graph.

       (for x2axis and y2axis the mapping of data onto the graph
	is not affected. To change the mapping of data on to the 
	graph use the Dn XMIN XMAX YMIN YMAX settings
	which control the portion of the data to be mapped for 
	a specific dataset.)

4 max

Sets the maximum values on the xaxis.
This will determine both
		the labelling of the axis
		and the default mapping of data onto the graph. 


       (for x2axis and y2axis the mapping of data onto the graph
	is not affected. To change the mapping of data on to the 
	graph use the Dn XMIN XMAX YMIN YMAX settings
	which control the portion of the data to be mapped for 
	a specific dataset.)


4 nofirst

This switch removes the first labels from the graph. (the first label
is often too close to the yaxis first label)

4 nolast

This switch removes the last labels from the graph. (the last label is
often too close to the yaxis first label)

4 nticks

Sets the number of major ticks for that axis.

4 dticks

Sets the distance between major ticks on that axis.

4 nsubticks

Sets the number of minor ticks for that axis.

4 dsubticks

Sets the distance between minor ticks on that axis.

4 off

Turns on or off the whole axis.  Labels, ticks, subticks and line.
If you turn x2axis off then the title of the graph will dissappear
as it is part of the axis,  the only way to get a title with
no axis is to turn the individual parts of the axis off, e.g:

	x2ticks off
	x2side off      
	x2labels off

3 xnames

  This command allows you to replace the numeric labelling 
  with absolutely anything.  To label data taken from Monday to 
  Friday, use the command -

       xaxis min 0 max 6 dticks 1
       xnames "" "Mon" "Tue" "Wed" "Thu" "Fri"  ""

    Note it is essential to define a specific axis minimum,
    maximum, dticks, etc., 
    otherwise the labels may not correspond to your data 
    (eg. gle could decide to start at x=1)

3 xplaces

  This is similar to the xnames command but it specifies a list 
  of points which will be labelled on the axis.

    - eg. xlabels font rm hei .2 color blue
	  xplaces 2 4 6 8 

  It maybe used in conjunction with the xnames command to specify
  the labels and their position. An example with days of the week 
  could be done like this
	     xaxis min 0 max 6 dticks 1
	     xlabels font rm hei .2 color blue
	     xplaces 1 3 5 
	     xnames "Mon" "Wed" "Fri"

  This command is usually used when you want labelling that 
  isn't spaced equally.

3 y2places

This is similar to the y2names command but it specifies a list 
of points which should be labelled.
The example with days of the week could be done like this

     y2places 1  3  5 ynames "Mon" "Wed" "Fri"

This command is usually used when you want labelling that isn't spaced
equally.

3 x2places

  This is similar to the x2names command but it specifies a list 
  of points which will be labelled on the axis.

    - eg. x2labels font rm hei .2 color blue
	  x2places 2 4 6 8 

  It maybe used in conjunction with the x2names command to specify
  the labels and their position. An example with days of the week 
  could be done like this
	     x2axis min 0 max 6 dticks 1
	     x2labels font rm hei .2 color blue
	     x2places 1 3 5 
	     x2names "Mon" "Wed" "Fri"

  This command is usually used when you want labelling that 
  isn't spaced equally.

3 yplaces

This is similar to the ynames command but it specifies a list 
of points which should be labelled.
The example with days of the week could be done like this

     yplaces 1  3  5 ynames "Mon" "Wed" "Fri"

This command is usually used when you want labelling that isn't spaced
equally.


3 xtitle

This command gives the axis a centered title.  The list of optional keywords
allow you to specify any features of it.
       
       eg. xtitle "X AXIS TITLE"
       or. xtitle "X AXIS TITLE" lwidth .2  color blue  font rmb

4 scale 
	Scales the height of the title for that axis.

4 hei 
	Sets the height for that title in cm.

4 dist
	Sets the distance away from the axis to draw the title
	Measured in cm.

4 color  
       Sets the colour to draw the title.
       Valid colours are black, white, red, green, blue,
			    cyan, magenta, yellow.

       The colours are implemented as shades of grey for monochrome
       postscript output. 
	eg. grey10 = yellow



4 font

   Specifies the font that will be used for labelling the axis.
   Most fonts are available in standard, bold, italic, and bold/italic.
   There are 3 families of fonts - ps (postscript), tex and pl. 

     Name      Description

	rm        Roman
	rmb       Roman Bold
	rmi       Roman Italic
	ss        San Serif
	ssb       San Serif Bold
	ssi       San Serif Italic
	tt        Typewriter





	psagb     AvanteGarde-Book
	psbd      Bookman-demi
	psc       Courier
	psh       Helvetica
	psncsb    New Century Schoolbook
	pspr      Palatino Roman
	pstr      Times Roman
	pszcmi    ZapfChancery-MediumItalic

	texcmb    Computer Modern Bold
	texcmr    Computer Modern Roman
	texcmsy   Computer Modern Symbols
	
	plcc      Complex Cartographic
	plge      Gothic English
	plsg      Simple German
	plsym1    Symbols 1
	plsym2    Symbols 2
	plba      Block Ascii

   
   Refer to Appendix A.2 in the manual for a full listing of
   the fonts.

3 gle

4 loadgraph

  Need help already Eh?

   Select graph to edit an existing graph or
   select create to make a new graph.

 
3 xlabels

4 off 
	This command controls whether the labelling on the axis
	is turned on or off. 
       
	Used in conjunction with the subcommands you can control the
	appearance of the labels.
       
	eg. xlabels dist .05 hei .3 font rm color blue

4 dist 
	Adds to the distance away from the axis that the labels are
	drawn.  

4 font 

   Specifies the font that will be used for labelling the axis.
   Most fonts are available in standard, bold, italic, and bold/italic.
   There are 3 families of fonts - ps (postscript), tex and pl. 

     Name      Description

	rm        Roman
	rmb       Roman Bold
	rmi       Roman Italic
	ss        San Serif
	ssb       San Serif Bold
	ssi       San Serif Italic
	tt        Typewriter





	psagb     AvanteGarde-Book
	psbd      Bookman-demi
	psc       Courier
	psh       Helvetica
	psncsb    New Century Schoolbook
	pspr      Palatino Roman
	pstr      Times Roman
	pszcmi    ZapfChancery-MediumItalic

	texcmb    Computer Modern Bold
	texcmr    Computer Modern Roman
	texcmsy   Computer Modern Symbols
	
	plcc      Complex Cartographic
	plge      Gothic English
	plsg      Simple German
	plsym1    Symbols 1
	plsym2    Symbols 2
	plba      Block Ascii

   
   Refer to Appendix A.2 in the manual for a full listing of
   the fonts.


4 hei 
	Sets the height of the major tick labels.
	This is measured in cm.

4 color 
	Sets the colour of the major tick labels.
	Valid colours are black, white, red, green, blue,
			    cyan, magenta, yellow.

	The colours are implemented as shades of grey for monochrome
	postscript output. 
	eg. grey10 = yellow
  
3 xside   
	 Sets features of the axis line itself
	   (colour, line width, on/off)  

4 lwidth 
	 Sets the line width of the axis line.
		 This is measured in cm.
		 The default is .02 cm.

4 off 
		Turns off the axis line.

4 color  
       Sets the colour of that side.
       Valid colours are black, white, red, green, blue,
			    cyan, magenta, yellow.

       The colours are implemented as shades of grey for monochrome
       postscript output.  
	eg. grey10 = yellow


4 lwidth  
	    Sets the width of the line for that side.
		 This is measured in cm
		 The default is .02 cm.

3 xticks 
	   Sets features to control the appearance of the major ticks.
	   (line style, line width, length, on/off) 
	   eg. xticks lwidth .01 length .1 lstyle 2

4 scale 
	  Scales the length of the major ticks

4 length 
	  Sets the length of the major ticks in cm.

4 lwidth  
	   Sets the line width of the major ticks.
		 This is measured in cm
		 The default is .02 cm.

4 color 
	  Sets the colour of the major ticks
	  Valid colours are black, white, red, green, blue,
			    cyan, magenta, yellow.
	  
	  The colours are implemented as shades of grey for monochrome
	  postscript output. 
	    eg. grey10 = yellow


3 xsubticks
	   Sets features to control the appearance of the minor ticks.
	   (line style, line width, length, colour, on/off) 

4 scale 
       Scales the length of the minor ticks

4 length 
       Sets the length of the minor ticks in cm.

4 lwidth 
	 Sets the line width of the minor ticks.
		 This is measured in cm
		 The default is .02 cm.

4 color      
	  Sets the colour of the minor ticks
	  Valid colours are black, white, red, green, blue,
			    cyan, magenta, yellow.
	  The colours are implemented as shades of grey for monochrome
	  postscript output. 
	    eg. grey10 = yellow


3 xtra
	This is the place to put EXTRA gle commands, that is any gle graph
	command which you can't find an entry cell for.

       For detailed control of each axis display there are further commands. 
       xside  -color, lwidth, off
       xticks -lstyle, lwidth, length, off
       xsubticks -lstyle, lwidth, length, off
	eg.
	  xside lwidth .05
	  indicates the line width of the xaxis (only) is to be changed.
	  ie. Not the ticks and associated xaxis parameters

	or.
	  xticks length .1 width .01
	  for control of the xticks display.

       These subcommands can be applied to the xaxis, yaxis, x2axis or y2axis.

  This is also where gle will put any gle graph commands that it found
  in your file that it couldn't understand.

2 Keyboard 
	(see    commands begin key, for help on the key module)
     Keyboard Mappings:

     VT100              VT200           PC              Meaning 
     GOLD 1             F11             F1              Help 
     GOLD 2             F12             F2              Save 
     GOLD 3             F13             F3              Load 
     GOLD 4             F14             F4              Save-as 
     GOLD 9             F9              F9              Graph-menu 
     GOLD 0             F10             F10             Draw-it 
     Control+Z          Control+Z       Control+Z       Exit/Escape 
					Alt+X           Exit/Escape 
     Control+E          Control+E                       Calls VAX EDT 
     Control+F          Control+F                       Toggle fast/slow text 
     Control+R          Control+R       F5              Shows errors 
					Control+S       Shells to DOS 

     Supported  devices:  VT100,  REGIS  (VT125, VT240), TEK4010,
     VWS, XWindows.

     Supported  output:  PostScript, HPGL, Epson, Epson 24pin, HP
     Deskjet Paintjet.

2 Beginners
 Drawing a Line on a Page
 ------------------------
     Let's  start  with  drawing  a  line on the page. GLE has to
     know  what size piece of paper you are working with. You can
     tell it by giving a size command:

	  size 18 27

     This  specifies  a  piece  of paper 18cm wide and 27cm high.
     Now  you  must define a current point by moving to somewhere
     on the page:

	  amove 2 4       

     The  origin  (0,0)  is at the bottom left hand corner of the
     page.  Now  suppose  we  wish to draw a line from this point
     across 1 cm and up 2 cm:

	  size 18 27
	  amove 2 4
	  rline 1 2

     That  was  a  relative  movement  as the x and y values were
     given  as distances from the current point, alternatively we
     could have used absolute coordinates:

	  size 18 27
	  amove 2 4
	  aline 3 6               ! absolute. 

     Now  if  you  want  to  draw  some  text on this page at the
     current point you would use the text command:

	  text Hi there

     So  we  have  now  constructed  an  entire  GLE  program  as
     follows, with the results illustrated below:

	  size 12 8 box 
	  amove 2 4
	  rline 1 2
	  text Hi there

 Drawing a Simple Graph
 ----------------------
     This  section will describe how to go about drawing a simple
     graph.

     The  following  data  points  are contained in a file called
     TUT.DAT

	 x   y
	 -----  (These top two lines do not appear in the file)
	 1   2
	 2   6
	 3   2
	 4   5
	 5   9

     The  data is in two columns with white space separating each
     column  of  numbers.  The  following  commands  will  draw a
     simple line graph of the data.

	 size 6 3 
	 begin graph
	    size 6 3 
	    data tut.dat
	    yaxis min 0 
	    d1 line marker star msize .2
	 end graph

     The  first  size  command  defines  the size of the piece of
     paper  which  may contain several graphs. The second defines
     the  size  of  this  particular graph. The actual graph axes
     are  by  default  0.7  of these dimensions. The ratio can be
     changed with the vscale and hscale commands.

     Without  the  "yaxis min 0" command the yaxis would start at
     2.0,  because  that is the minimum y value in the data. This
     makes the graph easier to interpret.

     Changing the above d1 command to:

	 d1 line marker circle 

     will  mark  each data point with a circle instead of a star.
     See    appendix   A  for  a  list  of  other  marker  names.

     A  smooth  line  can  be  drawn  between  the data points by
     changing the d1 command to:

	 d1 line marker circle smooth

     The  order  of  the  commands  is not important, except that
     circle    is  a  parameter  for  the  qualifier  marker  and
     therefore  must  come  straight after it. E.g.,  d1  [marker
     circle]  [line smooth]  [color blue]

2 Commands
     A   GLE  command  is  a  sequence  of  keywords  and  values
     separated  by white space (one or more spaces or tabs). Each
     command  must  begin  on  a  new  line.  Keywords may not be
     abbreviated,  the  case  is not significant. All coordinates
     are  expressed in centimetres from the bottom left corner of
     the page.

     GLE  uses the concept of a current point which most commands
     use.  For  example,  the  command aline 2 3 will draw a line
     from    the    current   point  to  the  coordinates  (2,3).

     The  current  graphics  state  also  includes other settings
     like  line width, color, font, 2d transformation matrix. All
     of these can be set with various GLE commands.

3 comment
    An "!" mark indicates  the  start  of  a comment. GLE ignores 
    everything from the exclamation point to the end of the line.

3 at
   An "@" sign executes a subroutine.
   e.g.
	@mytree

3 aline 
  aline x y [arrow start] [arrow end] [arrow both] 
     Draws  a  line  from  the  current  point  to  the  absolute
     coordinates  (x,y),  which  then  becomes  the  new  current
     point.  The  arrow qualifiers are optional, they draw arrows
     at  the  start  or end of the line, the size of the arrow is
     proportional to the current font height.

3 amove 
  amove x y
     Changes  the  current  point  to  the  absolute  coordinates
     (x,y).

3 arc 
 arc radius a1 a2
     Draws  an  arc  of a circle in the anti-clockwise direction,
     centered  at  the  current point, of radius radius, starting
     at  angle a1 and finishing at angle a2. Angles are specified
     in  degrees.  Zero  degrees  is  at three o'clock and Ninety
     degrees is at twelve o'clock.

	  arc 1.2 20 45

     The  command  narc  is  identical  but  draws the arc in the
     clockwise  direction.  This is important when constructing a
     path.

3 arcto 
 arcto x1 y1 x2 y2 rad
     Draws  a  line  from  the  current  point to (x1,y1) then to
     (x2,y2)  but  fits  an  arc  of  radius  rad joining the two
     vectors    instead   of  a  vertex  at  the  point  (x1,y1).

3  begin
4  block_name ... end block_name
 begin block_name ... end block_name
     There  are  several  block  structured commands in GLE. Each
     begin  must  have  a  matching  end. Blocks which change the
     current  graphics  state (e.g. scale, rotate, clip etc) will
     restore  whatever  they  change  at  the  end  of the block.
     Indentation  is  optional but should be used to make the GLE
     program easier to read.

4 box [fill pattern] [add gap] [nobox] [name xyz] 
 begin box [fill pattern] [add gap] [nobox] [name xyz] 
     Draws  a  box  around  everything  between begin box and end
     box.  The option add adds a margin of margin cm to each side
     of  the  box  to  make the box slightly larger than the area
     defined  by the graphics primitives in the begin box end box
     group  (to  leave a gap around text for example). The option
     nobox stops the box outline from being drawn.

     The  name  option saves the coordinates of the box for later
     use with the join command.

4 clip 
 begin clip 
     This  saves  the  current clipping region. A clipping region
     is  an  arbitrary  path  made  from  lines  and curves which
     defines  the  area  on which drawing can occur. This is used
     to  undo  the  effect  of a clipping region defined with the
     begin  path  command. See the example CLIP.GLE in appendix B
     at the end of the manual.

4 key
	Begin key
	  position tr
	  text "Green trees" marker heart fill grey 10 mscale 0.8
	  text "Oranges" marker square lstyle 3 msize 0.5
	End key
    - This produces a key in the top right of the graph. The first dataset
      has the text Green trees with hearts as markers fill pattern of grey 10
      and the marker scaled to 80% of the graph markers. The second dataset
      also has the linestyle specified and the marker size is .5cm.

    - You can position the key with one of two commands.
	offset xcm ycm
	position tl | bl | tr | br

    Commands which can be used to specify aspects of the key are
    text, lstyle, marker, msize, mscale, color, fill.

4 origin
 begin origin
     This  makes  the  current point the origin. This is good for
     subroutines    or  something  which  has  been  drawn  using
     amove, aline.  Everything  between  the  begin origin and end
     origin  can  be moved as one unit. The current point is also
     saved and restored.

4 path 
 begin path [stroke] [fill pattern] [clip] 
     Initialises  the  drawing  of  a filled shape. All the lines
     and  curves  generated  until the next end path command will
     be  stored and then used to draw the shape. stroke draws the
     outline  of  the  shape, fill paints the inside of the shape
     in  the given colour and clip defines the shape as a clipping
     region  for  all  future  drawing. Clipping and filling will
     only work on PostScript devices.

4 rotate 
 begin rotate angle
     The  coordinate  system  is rotated anti-clockwise about the
     current  point by the angle angle (in degrees). For example,
     to  draw a line of text running vertically up the page (as a
     Y axis label, say), type:

4  scale
 begin scale x y
     Everything  between  the  begin  and  end  is  scaled by the
     factors  x  and  y.  E.g.,  scale 2 3 would make the picture
     twice as wide and three times higher.

4 table
 begin table 
     This  module  is an alternative to the TEXT module. It reads
     the  spaces and tabs in the source file and aligns the words
     accordingly.  A single space between two words is treated as
     a real space, not an alignment space.

     With  a  proportionally  spaced font columns will line up on
     the  left  hand side but not on the right hand side. However
     with  a  fixed pitch font, like tt, everything will line up.

4 text 
 begin text [width exp] 
     This  module displays multiple lines/paragraphs of text. The
     block  of text is justified according to the current justify
     setting.  See  the  set  just  command  for a description of
     justification settings.

     If  a  width  is specified the text is wrapped and justified
     to  the  given  width. If a width is not given, each line of
     text  is  drawn as it appears in the file. Remember that GLE
     treats  text  in  the  same  way that LaTeXdoes, so multiple
     spaces    are  ignored  and  some  characters  have  special
     meaning. E.g, \ ^ _ & { }

     To  include  Greek  characters  in  the middle of text use a
     backslash  followed  by  the  name  of the character. E.g., 
     3.3\Omega S would produce ``3.3OS''.

     To  put  a space between the Omega and the S add a backslash
     space  at  the  end. E.g.,  3.3\Omega\ S produces ``3.3O S''

     Sometimes  the  space  control characters (e.g. \:) are also
     ignored,  this  may  happen  at  the  beginning of a line of
     text.  In  this  case  use  the control sequence \glasswhich
     will  trick GLE into thinking it isn't at the beginning of a
     line. E.g.,

	  text \glass \:\: Indented text

     There  are  several  LaTeXlike  commands  which  can be used
     within text, they are:

	^{}                 Superscript
	_{}                 Subscript
	\\                  Forced Newline
	\_                  Underscore character
	\,                  .5em (em = width of the letter `m')
	\:                  1em space
	\;                  2em space
	\char{22}           Any character in current font
	\chardef{a}{hello}  Define a character as a macro
	\def\v{hello}       Defines a macro
	\movexy{2}{3}       Moves the current text point
	\glass              Makes move/space work on beginning of line
	\rule{2}{4}         Draws a filled in box, 2cm by 4cm
	\setfont{rmb}       Sets the current text font
	\sethei{.3}         Sets the font height (in cm)
	\setstretch{2}      Scales the quantity of glue between words
	\lineskip{.1}       Sets the default distance between lines of text
	\linegap{-1}        Sets the minimum required gap between lines 

4 translate
 begin translate x y
     Everything  between  the  begin  and end is moved x units to
     the right and y units up.

3 bezier
 bezier x1 y1 x2 y2 x3 y3
     Draws  a  Bezier cubic section from the current point to the
     point  (x3,y3)  with  Bezier  cubic  control  points  at the
     coordinates  (x1,y1)  and (x2,y2). For a full explanation of
     Bezier  curves see the PostScript Language Reference Manual.

3 bigfile
 bigfile filename.gle
     This  command  reads  the  file one line at a time, compiles
     each  line and executes it. This means it can read any sized
     file.  However,  complex multi-line commands cannot be used.
     Subroutines   can  be  used  but  not  defined,  inside  the
     bigfile.  Note:  there  is  also  a  bigfile  option  in the
     graphing module for large datasets.

3 box
 box x y [justify jtype] [fill color] [name xxx] [nobox] 
     Draws  a  box, of width x and height y, with its bottom left
     corner  at the current point. If the justify option is used,
     the  box will be positioned relative to the specified point.
     E.g.,  TL  = top left, CC = center center, BL = bottom left,
     CENTRE  = bottom centre, RIGHT = bottom right, LEFT = bottom
     left.  See  set  just  for  a  description  of justification
     settings.

     If  a  fill  pattern  is  specified, the box will be filled.
     Remember  that  white fill is different from no fill pattern
     -  white  fill  will erase anything that was inside the box.

3 circle 
 circle radius [fill pattern] 
     Draws  a circle at the current point, with radius x.  If
     a  fill  pattern  is  specified  the  circle will be filled.

3 closepath
 closepath 
     Joins  the  beginning  of a line to the end of a line i.e.,
     it does an aline to the end of the last amove.

3 curve
 curve ix iy [ x1 y1 x y x y ... xn yn] ex ey 
     Draws  a  curve  starting  at  the current point and passing
     through  the  points  (x1,y1) (xn,yn), with an initial slope
     of  (ix,iy) to (x1,y1) and a final slope of (ex,ey). All the
     vectors  are  relative  movements  from  the  vector before.

3 define
 define marker markername subroutine-name
     This  defines a new marker called markername which will call
     the  subroutine  subroutine-name  whenever  it  is  used. It
     passes  two  parameters,  the first is the requested size of
     the  marker  and  the  second  is  a  value from a secondary
     dataset  which  can  be  used  to vary size or rotation of a
     marker for each point plotted.

3 for
 for var = exp1 to exp2 [step exp3] command [...] next var 
     The  for  ...  next  structure  lets  you  repeat a block of
     statements a number of times.

     GLE  sets  var  equal to exp1 and then repeats the following
     steps.

     If  var  is  greater than exp2 then GLE commands are skipped
     until the line after the next statement.

     The value exp3 is added to var.

     The  statements  between  the  for  and  next  statement are
     executed. itemize

     If  exp1 is greater than exp2 then the loop is not executed.

3 fopen
 fopen "myfile.dat" chan-name  read|write
	Opens a data file for read or write and associates a channel name   
	with it, e.g.

		fopen "a.dat" inchan read
		fopen "b.dat" outchan write
		until feof(inchan)
			fread inchan x y z
			rline x y
			fwrite outchan "In reverse " z y x
			fwriteln outchan " Total " x+y+z
		next 
		fclose inchan
		fclose outchan

3 fclose
 fclose chan-name
	Closes a channel which has been opened using fopen.

3 fread
 fread chan-name variable-list
	Reads data from a file and places it in the variables.  e.g.

		fread inchan i j x y z
	
	freadln is identical except that after reading the variables it 
	will then skip an extra numbers on the end of the line.

3 fwrite
 fwrite chan-name expression-list
	Writes the results of the string and numeric expressions 
	out to the channel which must have been opened using fopen.
	
	fwriteln prints a newline character after printing the 
	numbers.

3 grestore
 grestore
     Restores  the  most  recently  saved graphics state. This is
     the  simplest  way  to  restore  complicated transformations
     such  as  rotations and translations. It must be paired with
     a previous gsave command.

3 gsave
 gsave
     Saves  the  current  graphics  transformation matrix and the
     current point and the current colour, font etc.

3 if
 if expression then command [...] else command [...] end if
     If  expression  evaluates  to true, then execution continues
     with  the statements up to the corresponding else, otherwise
     the statements following the else and up to the
     corresponding end if are executed.

	  amove 3 3
	  if xpos()=3 then
	     text We are at x=3
	  else
	     text We are elsewhere
	  end if

     Note: end if is not spelt endif.

3 include 
 include filename
     The  commands  in  filename are read just as if they were in
     the  current GLE file. With a large include file GLE may run
     out  of  memory.  If  this  happens, use the bigfile command
     instead  of include. Note: there is also a bigfile option in
     the graphing module.

3 join
 join object1.just sep object2.just 
     Draws  a line between two named objects. An object is simply
     a  point  or a box which was given a name when it was drawn.

     The  justify  qualifiers  are the standard GLE justification
     abbreviations  (e.g.  TL=top left, see set just for details)

     If  sep  is  written as -, a line is drawn between the named
     objects e.g.

	  join fred.tr - mary.tl

     Arrow  heads  can  be  included  at both ends of the line by
     writing  sep  as  <->. Single arrow heads are produced by <-
     and  ->.  Note  that sep must be separated from object1.just
     and object2.just by white space.

     If  the justification qualifiers are omitted, a line will be
     drawn  between  the  centres  of the two objects (clipped at
     the  edges  of  the  rectangles  which  define the objects).

     See    Chapter    5  for  an  example  of  joining  objects.

3 marker
 marker marker-name [ scale-factor] 
     Draws  marker  marker-name at the current point. The size of
     the  marker is proportional to the current font size, scaled
     by  the  value  of  scale-factor  if  present.  Markers  are
     referred  to  by  name,  eg.  square,  diamond, triangle and
     fcircle.  Markers  beginning  with  the letter f are usually
     filled  variants.  Markers  beginning with w are filled with
     white  so  lines  are  not visible through the marker. For a
     complete list of markers refer to Appendix A.1.

3 defmarker
 defmarker mname fontname char_num scale dx dy 
	This command defines a new marker, from any font, it is 
	automatically centered but can be adjusted using dx,dy.
	e.g.
		defmarker hand pszd 43 1 0 0

3 postscript
 postscript filename.eps width-exp height-exp 
     Includes    an  encapsulated  postscript  file  into  a  GLE
     picture,  the  postscript  picture will be scaled up or down
     to  fit  the  width given. On the screen you will just see a
     rectangle.

     Only  the width-exp is used to scale the picture so that the
     aspect  ratio  is  maintained.  The  height  is only used to
     display  a  rectangle  of  the  right  size  on  the screen.

3 rbezier
 rbezier x1 y1 x2 y2 x3 y3
     This  command is identical to the BEZIER command except that
     the    points   are  all  relative  to  the  current  point.

3 return
 return exp
     The  return  command  is used inside subroutines to return a
     value.

3 reverse
 reverse 
     Reverses  the  direction  of  the current path. This is used
     when  filling  multiple  paths  in  order  that the Non-Zero
     Winding  Rule  will know which part of the path is `inside'.

     With  the  Non-Zero  Winding Rule an imaginary line is drawn
     through  the object. Every time a line of the object crosses
     it  from  left  to right, one is added to the counter; every
     time  a  line  of  the object crosses it from right to left,
     one  is  subtracted from the counter. Everywhere the counter
     is  non-zero is considered to be the `inside' of the drawing
     and is filled.

3 rline
 rline x y [arrow end] [arrow start] [arrow both] 
     Draws  a  line  from  the  current  point  to  the  relative
     coordinates  (x,y), which then become the new current point.
     If  the current point is (5,5) then rline 3 -2 is equivalent
     to  aline  8  3.  The  optional qualifiers on the end of the
     command  will  draw  arrows at one or both ends of the line,
     the  size  of  the arrow head is proportional to the current
     font size.

3 rmove
 rmove x y
     Changes  the current point to the relative coordinate (x,y).
     If  the current point is (5,5) then rmove 3 -2 is equivalent
     to amove 8 3.

3 save
 save objectname 
     This  command  saves  a  point  for  later use with the join
     command.

3 set 

4 cap
 set cap butt | round | square
     Defines what happens at the end of a wide line.

4 color
 set color col
     Sets  the  current  colour for all future drawing operations.
     There  are several pre-defined colours which can be specified
     by name.

     black,  white,  red,  green,  blue,  cyan,  magenta, yellow,
     grey10,  grey20  ...  grey90,  shade1  ... shade5, grid1 ...
     grid5

     It   is  also  possible  to  specify  a  grey  scale  as  an
     expression with 0.0 = black and 1.0 = white.

4 dashlen
 set dashlen dashlen-exp
     Sets  the  length  of  the  smallest  dash used for the line
     styles.  This  command  MUST  come  before  the  set  lstyle
     command.  This  may  be  needed  when scaling a drawing by a
     large factor.

4 font
 set font font-name
     Sets  the  current  font  to font-name. Valid font-names are
     listed in Appendix A.2.

     There    are  three  types  of  font:  PostScript,  LaTeXand
     Plotter.    They  will  all  work  on  any  device,  however
     LaTeXfonts  are  drawn  in  outline on a plotter, and so may
     not  look  very  nice.  PostScript fonts will be emulated by
     LaTeXfonts on non-PostScript printers.

4 fontlwidth
 set fontlwidth line-width
     This  sets the width of lines to be used to draw the stroked
     (Plotter  fonts)  on  a PostScript printer. This has a great
     effect on their appearance.

4 hei
 set hei character-size
     Sets  the height of text. For historical reasons, concerning
     lead  type  and  printing  conventions,  a  height  of  10cm
     actually  results  in  capital  letters  about  6.5cm  tall.

4 join
 set join mitre | round | bevel 
     Defines  how  two  wide  lines will be joined together. With
     mitre,  the  outside  edges  of  the  join are extended to a
     point  and  then  chopped off at a certain distance from the
     intersection  of the two lines. With round, a curve is drawn
     between the outside edges.

4 just
 set just left | center | right | tl | etc... 

     Sets    the  justification  which  will  be  used  for  text
     commands.

4 lstyle
 set lstyle line-style
     Sets    the    current  line  style  to  line  style  number
     line-style.  There are 9 predefined line styles (1--9). When
     a  line  style  is  given with more than one digit the first
     digit  is  read  as  a run length in black, the second a run
     length  in  white,  the  third  a  run length in black, etc.

4 lwidth
 set lwidth line-width
     Sets  the  width  of lines to line-width cm. A value of zero
     will  result  in  the  device default of about 0.02 cm, so a
     lwidth  of  .0001  gives a thinner line than an lwidth of 0.

3 sub
 sub sub-name parameter1 parameter2 etc
     Defines  a  subroutine. The end of the subroutine is denoted
     with  end  sub.  Subroutines must be defined before they are
     used.

     Subroutines  can  be  called  inside any GLE expression, and
     can  also  return  values.  The  parameters  of a subroutine
     become    local    variables.   Subroutines  are  reentrant.

	  sub tree x y a$
	     amove x y
	     rline 0 1
	     write a$
	     return x/y
	  end sub
	  @tree 2 4 "mytree"         (Normal call to subroutine)
	  slope = tree(2,4,"mytree")  (Using subroutine in an expression)

3 text
 text unquoted-text-string
     This  is  the simplest command for drawing text. The current
     point  is  unmodified  after  the text is drawn so following
     one  text  command  with  another  will result in the second
     line  of  text  being drawn on top of the first. To generate
     multiple  lines  of  text,  use  the  begin  text  end  text
     construct.

	  text "Hi, how's tricks", said Jack!

3 textdef
 textdef /def/mycmd{whatitshouldo}
	This allows macro's to be defined without being drawn
	(this get's past a bug with the def command)

3 write
 write string$
     This  command  is  similar  to text except that it expects a
     quoted  string,  string  variable, or string expression as a
     parameter.

     The  built  in functions sqrt() and time$() are described in
     appendix A.3.

3 expressions
     Wherever  GLE  is expecting a number it can be replaced with
     an expression. For example

	  rline 3 2

     and

	  rline 9/3 sqrt(4)

     will produce the same result.

     An  expression in GLE is delimited by white space, so it may
     not  contain  any  spaces  -  `  rline 3*3 2' is valid but `
     rline 3 * 3 2' will not work.

     Or  `  let  d2  =  3+sin(d1)'  will  work  and ` let d2= 3 +
     sin(d1) ' won't.

     Expressions  may  contain numbers, arithmetic operators ( +,
     -,  *,  /, ^(to the power of)), relational operators ( >, <,
     =>,  <=,  =, <>) boolean operators ( AND, OR), variables and
     built-in functions.

     When  GLE  is expecting a colour or marker name (like `green'
     or  `circle')  it  can  be  given  a  string variable, or an
     expression enclosed in braces).

     GLE  provides  a  large  number of built in functions, these
     are listed in Appendix A.3.

3 functions
 xg(), yg()
     With  these  functions  it is possible to move to a position
     on  a  graph  using the graph's axis units. To draw a filled
     box  on  a  graph, at position x=948, y=.004 measured on the
     graph axis:

	  begin graph
	     xaxis min 100 max 2000
	     yaxis min -.01 max .01
	     ...
	  end graph
	  amove xg(948) yg(.004)
	  box 2 2 fill grey10 

 xend(), yend()
     These  functions  return  the  end  point  of the last thing
     drawn.  This  is  of  particular interest when drawing text.

	  text abc
	  set color blue
	  text def      

     This  would  draw the def on top of the abc. To draw the def
     immediately  following the abc simply do the following (Note
     that absolute move is used, not relative move):

 xpos(), ypos()
     Returns  the  current  x  and  y  points. 



3 offset
 offset x-exp y-exp
     Specifies  the  offset  in  cm from the current point to the
     bottom  left  hand  corner of the graph. This command should
     be on a line of its own.

3 position
 position justify-exp
     This  is an alternative to the OFFSET command. It allows you
     to  specify  a  position  on the graph, e.g., tl = top left.
     This  command  should  be on a line of its own. See set just
     for a list of justify settings.

3 text
 text str-exp
     The  text  which  will  be displayed on the end of the line.

3 lstyle
 lstyle style-num
     The  line  style which will be used for the short line drawn
     in the key.

3 marker
 marker marker-name
     The  marker  which  will  be  used for that line of the key.

     See   GLE GRAPH MDATA for information on how to define a 
	   subroutine as a marker.

3 mdata
  This allows you to pass an extra parameter to a subroutine which
  has been defined as a marker.

  In this example boxes of different sizes would be drawn on 
  each point on the graph.  
	
	sub mark_sub1 mysize 
		gsave                           ! save font and x,y
		box mysize mysize justify cc 
		grestore                        ! restores font and x,y
	end sub
	define marker myname mark_sub1
		
	The second parameter is supplied using the MDATA command
	when drawing a graph,  this gives the marker subroutine a 
	value from another dataset to use to draw the marker.  For 
	example the marker could vary in size, or angle, with every
	one plotted.
		d3 MARKER myname MDATA d4

3 msize
 msize exp
     Specifies the size of the markers in cm.

3 mscale
 mscale exp
     Specifies  how  much  to scale the size of the marker. E.g.,
     0.5    would  produce  a  marker  half  as  big  as  normal.

3 color
 color color-name
     The colour of the text, line and marker.

3 hei
 hei cm-exp
     This  sets  the height of the text used to draw the key. The
     key  will change in size to fit around the text. If you omit
     this command the current font size is used.

3 fill
 fill fill-pattern
     The fill pattern used in that line of the key.


2 Color
     Internally  GLE  treats colour and fill identically, they are
     simply  an  intensity  of  Red,  Green and Blue. Each of the
     predefined  colour  names  (yellow,grey20,orange,red)  simply
     define the ratio of red, green and blue.

     There  are  two  ways to use variables to show colour, one is
     for shades of grey:

	  for i = 0 to 10
	     box 3 .2 fill (i/10)
	     rmove 0 .2
	  next i

     The  other  is  for  passing  a  colour  name  as a variable:

	  sub stick c$
	     box .2 2 fill c$
	  end sub
	  @stick "green"        

     Remember  a  fill pattern completely obscures what is behind
     it,  so  the  following  command  would produce a box with a
     shadow:

	  amove 4 4 
	  box 3 2 fill grey10
	  rmove -.1 .1
	  box 3 2 fill white
	  rmove .4 .4
	  text hello

2 Devices
     GLE supports the following devices.

     Interactive:  IBM/PC  (BGI),  VT100,  REGIS  (VT125, VT240),
     TEK4010, VWS, XWindows.

     Output:  PostScript,  HPGL,  EPSON, EPSON 24pin, HP Deskjet.

3 Screen
     Remember  that  what you see on the screen isn't always what
     you  will  get  on  the  printer. For example filled regions
     will  not be filled, and some characters may not look right.

     After   pressing  F10  and  drawing  the  graph  it  can  be
     annotated  by using the mouse (or arrow keys) to draw lines,
     text  and boxes. To draw lines simply click on the points of
     the  line,  use the right hand mouse button to `pick up' the
     pen.

     To  draw  text  press the letter `t' and then click on where
     you would like the text to be drawn.

     All  movements  are  rounded to the grid size settings which
     are 1.0cm, 0.1cm, 0.01cm etc.

     The  height and colour of the text/lines is determined by the
     current settings at the end of the GLE file.

     If  there  is  no mouse driver loaded then a cross-hair will
     appear  and  it  can  be  moved around using the arrow keys.
     Press    `c'    to  click,  instead  of  the  mouse  button.

4 SuperVGA
	To use a SuperVGA card you first need to get a BGI 
	driver that supports your card.  From anonymous FTP 
	you can get svgabgi3.zip:
		ftp wuarchive.wustl.edu
		ftp> user anonymous
		ftp> (mail ident)
		ftp> cd /mirrors/msdos/borland
		ftp> binary
		ftp> get svgabgi3.zip
		ftp> quit
	
	Then unzip it, decide which driver will match your SVGA card
	and copy that driver into \GLE\EXE

		c:> pkunzip svgabgi3.zip
		c:> type readme.
		c:> copy svga16.bgi \gle\exe

	Define an environment variable to tell gle about this driver
	and which mode to use. (put this line in your autoexec.bat)

		c:> set gle_addbgi=4.svga16

3  PostScript 
     To print a GLE file to the laser printer type:

	  $ cgle myfile /print

     or on a PC:

	  C:\GLE> psgle myfile   
	  C:\GLE> print myfile.ps 
     
     or on Unix:
	  gle myfile -dps       (normal)
	  gle myfile -deps      (Encapsulated Postscript)
	  gle myfile -dps -addd (Normal with ^D characters)

     The  postscript  drivers  for  GLE will automatically flip a
     picture  to  best  fit  onto the page, e.g. a wide graph (as
     defined  by  the  size  command at the top) will be drawn in
     landscape  mode  and  a  tall  thin  graph  will be drawn in
     portrait mode.

     To  produce  an  .eps file on a VAX for inclusion in LaTeX or
     WordPerfect you would type:

	  $ cgle myfile /dev=eps

     On a PC you would type:

	  C:\GLE> psgle myfile  /eps
	  (this creates myfile.eps, not myfile.ps)

     Inside your LaTeX document use the LaTeX command:

	  \graphin{myfile.eps}{12.0cm}{3.0cm}{1.0}

     The  width  and  height  are  used by LaTeX to reserve enough
     space  for  the  drawing  and  the last parameter is a scale
     factor.

     The  laser  printer  driver  will  draw all zero width lines
     .02cm  wide  for  any  line  width  equal to zero, but if an
     lwidth  is greater than zero and less than or equal to .0001
     then  it  will  use a line width of 1 pixel. Without this it
     would  be  impossible  to  specify  a line width that didn't
     occasionally get rounded to 2 pixels.

3 TEK4010 
     This  driver  allows  initialization sequences to be defined
     with the symbols TEK_OPEN and TEK_CLOSE.

     On  a  VAX this is normally done by CGLECMD.COM so that when
     you  specify  /DEV=V550  the  assignments  are done for you.
     (V550 = Visual 550)

3 HPGL 
     This  driver  allows  initialization sequences to be defined
     in  the  symbols  HPGL_OPEN  and  HPGL_CLOSE.  On the PC use
     environment  variables  and on the VAX use DCL symbols. Also
     HPGL_WIDTH  and  HPGL_HEIGHT  can  be  defined  for  non  A3
     plotters.

     HPGL_ADDX, HPGL_ADDY are margins for the lower left hand
     corner of the page,  defaults are .9cm and 1.5cm

     On  a  VAX this is normally done by CGLECMD.COM so that when
     you  specify  /DEV=HPA4  the  assignments  are done for you.

     The   HPGL  driver  assigns  the  following  colours  to  pen
     numbers:

     1=black,    2=red,    3=green,  4=blue,  5=magenta,  6=white

3 dotmatrix
     GLE  supports the EPSON 8 and 24 pin and HP deskjet/laserjet
     printers.  To  support  bitmap devices which require a large
     amount  of memory GLE first writes a device independent file
     OUT.DVI,   then  the  appropriate  bitmap  driver  for  your
     printer  will  read  the  OUT.DVI  file  and create a bitmap
     which it then prints to LPT1:

	  C:> dvigle myfile      (produces OUT.DVI)
	  C:> dviprint -depson   (creates bitmap and prints to LPT1:)

     The output options are:

   Usage: dviprint [-depson | -dlj] [-old] [-hires] [-debug] [-output xx.prt]   
		-depson   To produce output for epson printers 
		-dwp      To add tiff image to wp .eps file 
		-dlj      To produce output for HP LaserJet printers 
		-dpj      To produce output for HP PaintJet printers 
		-over     Overhead transparency mode for PaintJet
		-old      For old HP Laser Jet printers (no compression)
		-hires    Uses high resolution for that printer (slower)
		-wide     If your printer has a wide carriage 
		-noflip   Disable's auto flipping 
		-nosquash Tries to print it full size
		-compress Force internal bitmap compression (slow,saves memory) 
		-noff     No form feed
		-debug    Prints debug messages
		-out x.x  Prints output to file instead of printer port

     The    high   resolution  drivers  (dviep24,  dvilj300)  are
     significantly  slower  than  the  low  resolution drivers so
     would only be used for final output.

2 Fonts 
     font-name  Description 
     rm         Roman 
     rmb        Roman Bold 
     rmi        Roman Italic 
     ss         San Serif 
     ssb        San Serif Bold 
     ssi        San Serif Italic 
     tt         Typewriter 
     ttb        Typewriter Bold 
     tti        Typewriter Italic 

     font-name  Description 
     psagb      AvantGarde-Book 
     psagbo     AvantGarde-BookOblique 
     psbd       Bookman-Demi 
     psbdi      Bookman-DemiItalic 
     psbl       Bookman-Light 
     psbli      Bookman-LightItalic 
     psc        Courier 
     pscb       Courier-Bold 
     pscbo      Courier-BoldOblique 
     psco       Courier-Oblique 
     psh        Helvetica 
     pshb       Helvetica-Bold 
     pshbo      Helvetica-BoldOblique 
     psho       Helvetica-Oblique 
     psncsb     NewCenturySchlbk-Bold 
     psncsi     NewCenturySchlbk-Italic 
     psncsr     NewCenturySchlbk-Roman 
     pspr       Palatino-Roman 
     pstr       Times-Roman 
     psti       Times-Italic 
     pstb       Times-Bold 
     pstbi      Times-BoldItalic 
     pszcmi     ZapfChancery-MediumItalic 
     pszd       ZapfDingbats 
     pssym      Symbol 

     font-name  Description 
     texcmb     Computer Modern Bold 
     texcmex    Computer Modern Extensible 
     texcmitt   Computer Modern Italic Typewriter 
     texcmmi    Computer Modern Maths Italic 
     texcmr     Computer Modern Roman 
     texcmss    Computer Modern Sans Serif 
     texcmssb   Computer Modern Sans Serif Bold 
     texcmssi   Computer Modern Sans Serif Italic 
     texcmsy    Computer Modern Symbol 
     texcmti    Computer Modern Text Italic 
     texcmtt    Computer Modern Typewriter Text 

     font-name  Description 
     plcc       Complex Cartographic 
     plcg       Complex Gothic 
     plci       Complex Italic 
     plcr       Complex Roman 
     plcs       Complex Script 
     pldr       Duplex Roman 
     plge       Gothic English 
     plgg       Gothic German 
     plgi       Gothic Italian 
     plsa       Simplex Ascii 
     plsg       Simplex German 
     plsr       Simplex Roman 
     plss       Simplex Script 
     plsym1     Symbols one 
     plsym2     Symbols two 
     plti       Triplex Italic 
     pltr       Triplex Roman 
     plba       Block Ascii 

  Fonts (font mapping)
     By  default the generic fonts (rm, rmb, ss, tt etc) will all
     map  to  PLSR  (plotter  simplex  roman)  on BITMAP and HPGL
     drivers.  To  make  this  happen  on  other  drivers put the
     command  plotter fonts immediately after the size command at
     the top of the GLE file.

     A  typical  result of this change in fonts is that something
     that  lines  up  on the screen will not line up when printed
     to  an  EPSON  printer. If this happens then use the plotter
     fonts command.

     If  a  character  is  missing  from  a  font,  or  isn't the
     particular  variation  you  like, you can define a character
     to be from a different font in this way:

	  \chardef{%}{{\setfont{texcmr}\char{37}}} 
	  \chardef{[}{{\setfont{texcmr}\char{91}}} 
	  \chardef{]}{{\setfont{texcmr}\char{93}}} 

     On  the  PC  some  fonts  may  not be installed to save disk
     space.  When  one  of  the  missing  fonts  is called for, a
     replacement  font  will be displayed, this may look terrible
     and   some  special  characters  may  be  completely  wrong.

     More  importantly  if you use a font which does not have its
     font  metric  file  installed  (e.g.  C:/GLE/FONTS/PLSR.FMT)
     then   the  PostScript  driver  will  space  the  characters
     incorrectly.    This    can  be  fixed  by  extracting  that
     particular    metric    file   from  the  distribution  file
     CGLE_FVE.ZIP using PKUNZIP.

2 Clip
     It  is  possible to set up arbitrary clipping regions. To do
     this  draw  a  shape  and  make  it into a path by putting a
     begin  path  clip  ...  end  path,  around it. Then draw the
     things  to  be  clipped  by that region. To clear a clipping
     path  surround  the whole section of GLE commands with begin
     clip ... end clip

     Characters  can  be used to make up clipping paths, but only
     the  PostScript  fonts will currently work for this purpose.

	  size 10 5 
	  begin clip       ! Save current clipping path
	     begin path clip stroke  ! Define new clipping region
		amove 2 2 
		box 3 3 
		amove 6 2 
		box 3 3 
	     end path
	     amove 2 2 
	     set hei 3
	     text Here is clipped text
	  end clip         ! Restore original clipping path

2 Variables
     GLE  has  two types of variables, floating point and string.
     String  variables  always  end  with a dollar sign. A string
     variable  contains  text  like  ``Hello  this  is  text'', a
     floating  point  variable  can  only  contain  numbers  like
     1234.234.

	  name$ = "Joe"
	  height = 6.5    ! Height of person
	  shoe = .05      ! shoe adds to height of person
	  amove 1 1
	  box .2 height+shoe
	  write name$   

2 Functions
     Function Name              Returns 
     TIME$()                    current time e.g. ``11:44:27'' 
     DATE$()                    current date e.g. ``Tue Apr 09 1991'' 
     LEFT$(str$,exp)            left exp characters of str$ 
     RIGHT$(str$,exp)           rest of str$ starting at exp 
     SEG$(str$,exp1,exp2)       str$ from exp1 to exp2 
     NUM$(exp)                  string representation of exp 
     NUM1$(exp)                 as above but with no spaces 
     VAL(str$)                  value of the string str$ 
     POS(str1$,str2$,exp)       position of str2$ in str1$ from exp 
     LEN(str$)                  the length of str$ 

     Function Name              Returns 
     ABS(exp)                   absolute value of expression 
     ATN(exp)                   arctan 
     COS(exp)                   cosine 
     EXP(exp)                   exponent 
     FIX(exp)                   exp rounded towards 0 
     INT(exp)                   integer part of exp 
     LOG(exp)                   log to base e of exp 
     LOG10(exp)                 log to base 10 of exp 
     SGN(exp)                   returns  1  or -1.
     SIN(exp)                   sine of exp 
     SQR(exp)                   exp squared 
     TAN(exp)                   tangent of exp 
     NOT(exp)                   logical not of exp 
     RND(exp)                   random number from seed exp 
     SQRT(exp)                  square root of exp 

     Function Name              Returns 
     XEND()                     the x end point of a text string when drawn 
     YEND()                     the y end point of a text string when drawn 
     XPOS()                     the current x point 
     YPOS()                     the current y point 
     TWIDTH(str$)               the width of str$ assuming current font, size
     THEIGHT(str$)              the  height  of  str$ assuming current font, size 
     TDEPTH(str$)               the  depth of str$ 
     XG(xexp)                   converts units of last graph to abs cm. 
     YG(yexp)                   converts  units  of last graph to abs cm. tabular


2 Changehelp
	If you change the help file, (graph.hlp) then you must re-create
	the help index file GRAPH.IDX, to do this simply type in 
		C:\GLE> makeidx

2 Usage
	The command syntax depends largely on your system (UNIX,VMS,PC)
	but most of these qualifiers should work:

		/trace          Prints each line as it is executed
		/debug          For debugging purposes, use at own risk
		/drawit         To draw on screen directly from DOS.
		/nod            Don't add ^D's to postscript file.
		/addd           Do add ^D's to postscript file.
		/eps            Create Encapuslated Postscript file.
		/nomaxpath      Don't limit size of complex path's
		/out=a.ps       Specify output file (depends on device)

	e.g.
		(VAX) $ cgle test /dev=ps /trace        

		(PC) C:> psgle test /eps

		unix> gle test -dps /addd

   Environment variables (PC):

	To stop GLE from adding ^D characters to PostScript files use:

		C:> set gle_nocontrold=true

	If you want to put your BGI files in a different directory
	to GLE\EXE then:

		C:> set gle_bgi=c:\tc\bgi

	If you want to use a non standard BGI driver then define:

		C:> set gle_addbgi=4.svga256        (mode,filename)

2 (end)
1 (end)
