AXES and GRID Statements

 
By including an axis or grid with appropriate tic marks and labels you can make data plots and graphs more readable and meaningful. The AXES and GRID statements make this easy. The AXES statement draws a single X-Y axis across the soft-clip area, while the GRID statement generates grid lines across the entire soft-clip area. They are specified as follows:
 
AXES [xtic [,ytic [,xorg [,yorg [,xcnt [,ycnt [,size]]]]]]]
GRID [xtic [,ytic [,xorg [,yorg [,xcnt [,ycnt [,size]]]]]]]
 
Where:
x/ytic = tic spacing
x/yorg = origin of axis
x/ycnt = major tic counts
size   = major tic size
 
The default values for the X and Y tic spacing and the axis or grid location are 0,0,0,0. The X and Y major tic counts specify the number of tic intervals between major tic marks. Their default values are 1 indicating that every tic interval is major. The default major tic length is two graphic display units. The minor tic marks are half the length of the major tic marks.
 
The AXES statement produces tic marks that are symmetric about the axis and that extend to the soft-clip boundaries. If the X or Y axis is outside the soft-clip area, tic marks are drawn in the soft-clip area. The AXES lines and tic marks are drawn in the current line type and pen number. A major tic is placed at the axis origin.
The GRID statement generates major tic marks lines across the entire soft-clip area. Cross tic marks are generated at the minor tic mark intersections. The grid is drawn with the current line type and pen number. The pen position after a GRID statement is at the axis origin. For example:
 
GINIT
AXES 5,5,50,50,2,3
DRAW 60,60
END
 
produces an axis with the origin at 50,50. A tic mark is placed every 5 units in both the X and Y direction. In the X direction every second tic mark is twice as big as the others, because it is a major tic. Every third tic mark in the Y direction is a major tic. The DRAW statement shows you the current X,Y location. Now change the AXES line to the GRID statement.
 
GRID 5,5,50,50,2,3
 
The origin of the GRID is at 50,50 just like the AXES. The major tic marks extend across the entire soft-clip area. Where the minor tic marks cross, a small tic is placed. The DRAW statement again shows you the current X,Y location.
 
To create a fully enclosed box with tic marks along the outside use two AXES statements, one with an intercept in the lower left corner of the screen, and the other in the upper right corner of the screen.