PLTaxisRec TCL UTILITIES USER MANUAL PLTaxisRec
SYNOPSIS
Tick mark and annotate rectangular plot axis
PACKAGE
TCLPLT
NAME
PLTaxisRec
USAGE
PLTaxisRec  pID Axis TMode LMode Level {Pos} {LJust} {Label}
INPUT DEFINITIONS
pID - The identifier of the plot whose axis is to be modified.
Axis - The axis to be modified. This can either be Xb or Xt for the bottom or top X axis or Yl or Yr for the left or right Y axis.
TMode - Flag indicating if any tick marks are to be output. This can be:
NONE - No tick mark output
ALLMAJOR - Output all the major tick marks along Axis
ALLMINOR - Output all the minor tick marks along Axis
BOTH - Output all the major and minor tick marks along Axis
ONEMAJOR - Output one the major tick mark along Axis at Pos
ONEMINOR - Output one the minor tick mark along Axis at Pos
LMode - Flag indicating if any labels are to be output. This can be:
NONE - No label output
AUTO - Output labels for all the major tick marks along Axis
AXIS - Label Axis, putting the Label at Pos at the specified Level and with the specified justification LJust.
MANUAL - Used with ONEMAJOR or ONEMINOR to indicate that the tick mark being output should be annotated with the supplied Label.
Level - The output level in characters of any annotation. For annotation associated with tick marks level is measured from the point of the fartheset tick mark extension from the axis being annotated. For axis labeling level is measured from the farthest tick mark annotation along that axis being annotated.
Pos - An optional input which is defaulted to 0.0. This is used when drawing single tick marks to locate the position along the axis where the tick mark is to be placed. When labeling an axis it defines the position along the axis where the label is to be anchored.
LJust - An optional input which gives the justification to use when outputting annotation. The default is center. Other recognized options are left and right. Left places the right edge of the label at Pos while right places the left edge of the label at Pos.
Label - An optional input which provided the label to output when LMode is set to either AXIS or MANUAL. It is defaulted to "".
RETURN DEFINITION
None
DESCRIPTION
PLTaxisRec is a low level procedure for putting tick marks and annotation on a plot axis in a rectangular (box type) plot. It is one of the procedures used by PlotOutline to annotate plot axes and is generally used outside of PlotOutline to add additional annotation to plots but could be used to fully tick mark and annotate a plot in place of PlotOutline.
PLTaxisRec will place tick marks and/or annotation on the axis specified in Axis in the plot identified by pID. Tick marks are output according to TMode. If set to NONE then there are no tick marks output. Single major or minor tick marks can be output by setting TMode to either ONEMAJOR or ONEMINOR respectively; all of the major or minor tick marks by setting TMode to either ALLMAJOR or ALLMINOR respectively; or all the tick marks by setting TMode to BOTH. In the case of ONEMAJOR or ONEMINOR the tick mark is output at Pos.
Annotation can be output either on its own or in conjunction with tick marks. The output mode is set in LMode. MANUAL mode is used in conjunction with ONEMAJOR or ONEMINOR with the label specified in Label output in conjunction with tick mark. The label placement is made in accordance with LJust and Level. Positive level values outputs the label outside the plot box and negative level values outputs the label inside the plot box. Level is measured in characters from the farthest extending inwards (negative level) or outwards (positive level) tick mark. The AUTO annotation mode is similar to MANUAL except that it produces all of the numerical annotation for major tick marks (even if they have not been or are not being drawn). AXIS mode annotation is again like MANUAL mode using both Pos and Level for positioning and LJust for alignment. The difference is that in AXIS based annotation Level is measured from the from the farthest extending inwards (negative level) or outwards (positive level) numerical annotation.
ERRORS
None Generated
C BACKING
No
EXAMPLE(S)
EXAMPLE 1:Usage examples
# SET a window size

set GphInfo(xsScrL) 600
set GphInfo(ysScrL) 500
set GphInfo(xScrL) 600
set GphInfo(yScrL) 500

# OPEN graphics
 
GraphicsOn TK RainBow 

# DEFINE the plot window and assign the plot number

GenWindow 1 0.2 0.2 0.0 0.85 0.85 0.0  -6.0 -6.0 0. 6.0 6.0 0.
DefinePlot 1 1 -1 -1

# ASSIGN a size of 10pt to numerical and text labels

PLTinfoChg 1 ALL NUMBERS NSIZE 10
PLTinfoChg 1 ALL NUMBERS TSIZE 10

# SET the current line color to white

PlotColor HOLD 255 OFF

# OUTLINE the window which is the box plot axes 

Box 1 -6. -6. 0. 6. 6. 0

# PUT up a major tick mark at 0.0 on lower X axis and give it a label MAJOR

PLTaxisRec 1 Xb ONEMAJOR MANUAL 1.0 0.0 center MAJOR

# NOW a minor tick mark at 5.0 on lower X axis and give it a label MINOR

PLTaxisRec 1 Xb ONEMINOR MANUAL 1.0 5.0 center MINOR

# PUT up all the major tick marks on the upper X axis

PLTaxisRec 1 Xt ALLMAJOR NONE 1.0 

# PUT up all the minor tick marks on the right Y axis

PLTaxisRec 1 Yr ALLMINOR NONE 1.0 

# PUT up all the major tick numerical labels on the left Y axis

PLTaxisRec 1 Yl NONE AUTO 1.0 

# PUT up an AXIS label on the lower X axis right under the major tick mark

PLTaxisRec 1 Xb NONE AXIS 1.0 0.0 center MARK
      
Apr 7, 2007