PLTaxisPolar TCL UTILITIES USER MANUAL PLTaxisPolar
SYNOPSIS
Tick mark and annotate polar plot axis
PACKAGE
TCLPLT
NAME
PLTaxisPolar
USAGE
PLTaxisPolar  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 is either Xb or Yl. Xt and Yr can be used when outputting AXIS labels (see LMode).
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. These can be at a specific radius if Axis is Yl or at a specific phi angle if Axis is Xb.
ALLMINOR - Output all the minor tick marks along Axis. These can be at a specific radius if Axis is Yl or at a specific phi angle if Axis is Xb.
BOTH - Output all the major and minor tick marks along Axis
ONEMAJOR - Output one the major tick mark along Axis at the radius and phi position given in Pos.
ONEMINOR - Output one the minor tick mark along Axis at the radius and phi position given in 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. AXIS labels are output relative to the bounding window of the polar plot which is scaled according to the window scaling in which the plot is defined.
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 and may be used when drawing ALL tick marks. It is ignored if TMode is BOTH. When drawing single tick marks this is a list with the first element being the radial distance of the tick mark and the second the phase angle. When drawing ALL tick marks if input as a list then ALL tick marks at a given radius or along a given phase angle will be drawn depending on if Axis is Yb or Xb respectively. If given an a single value then all major or minor tick marks will be output for the Axis. When labeling an axis Pos is a single value and 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
PLTaxisPolar is a low level procedure for putting tick marks and annotation on a plot axis in a polar 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.
PLTaxisPolar 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.
if TMode is set to either ONEMAJOR or ONEMINOR then Pos must be entered as a two element list. The first element in the list is the radius at which the tick mark will be output and the second is the phase. The same format is used if TMode is set to either ALLMAJOR or ALLMINOR and the tick marks are to be output only along a set radius or phase. In this case only one of the two elements is used; the phase if Axis is Xb and the radius if Axis is Yr. To output all the major and/or minor tick marks over the entire polar plot leave Pos at its default value.
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 outer plot circle for Yl and below the phi 0 degree line for Xb; for negative level values label are placed inside the outer plot circle for Yl and above the phi 0 degree line for Xb. Level is measured in characters from the farthest extending inwards (negative level) or outwards (positive level) tick mark. Tick marks which span the plot are not considered in the computation. 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. One significant difference is that AXIS based labels are output with respect to the bounding box surrounding the polar plot.
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

PLTinfoChg 1 ALL AXIS FORMAT POLAR

SqWindow 1 0.2 0.2 0.0 0.5 -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 minor tick lengths to .1

PLTinfoChg 1 ALL TICKS MNLENGTH .05

# SET the current line color to white

PlotColor HOLD 255 OFF

# OUTLINE the window which is the box plot axes 

Arc 1 0. 0. 0. 6. 0.0 360.0 0 1 -1

# PUT up a major tick mark at 0.0 on radial axis and give it a label XMAJOR

PLTaxisPolar 1 Xb ONEMAJOR MANUAL 1.0 3.0 center XMAJOR

# NOW a minor tick mark at 45.0 on phi axis and give it a label YMAJOR

PLTaxisPolar 1 Yl ONEMAJOR MANUAL 1.0 [list 6.0 45.0] right YMAJOR

# NOW a minor tick mark at 75.0 at radius 3 on phi axis

PLTaxisPolar 1 Yl ONEMINOR NONE 1.0 [list 3.0 75.0]

# AND a minor tick mark at radius 4 and phi 45 on radial axis

PLTaxisPolar 1 Xb ONEMINOR NONE 1.0 [list 4.0 45.0]

# ALL minor tick mark at phi 135 on radial axis

PLTaxisPolar 1 Xb ALLMINOR NONE 1.0 [list 5.0 135.0]

# ALL minor tick mark at radius 4 on phi axis

PLTaxisPolar 1 Yl ALLMINOR NONE 1.0 [list 5.0 135.0]

# PUT up an AXIS labels on all sides of plot

PLTaxisPolar 1 Xb NONE AXIS 1.0 0.0 center XBOTTOM
PLTaxisPolar 1 Xt NONE AXIS 1.0 0.0 center XTOP
PLTaxisPolar 1 Yl NONE AXIS 1.0 0.0 center YLEFT
PLTaxisPolar 1 Yr NONE AXIS 1.0 0.0 center YRIGHT
      
Apr 17, 2007