PlotOutlines TCL UTILITIES USER MANUAL PlotOutlines
SYNOPSIS
Generate plot axes and labels
PACKAGE
TCLPLT
NAME
PlotOutlines
USAGE
PlotOutlines  pID LabOps NumOps {ShowAxes}
INPUT DEFINITIONS
pID - The plot iD which is set in the DefinePlot procedure.
LabOps - A list which specifies the options used when generating the plot text labeling. The list has a maximum of 8 elements which are defined in the table below. Elements not specified are defaulted to the values given.
LabOps List Definition
INDEX DEFAULT DEFINITION
0 "" The label to place on the lower X axis. This is ignored if the axis is a time-based axis.
1 1.0 The offset from the numerical labels (or from the axis is there are no numerical labels) at which to output the lower X axis label. The offset is in terms of character size.
2 "" The label to place on the left Y axis. This is ignored if the axis is a time-based axis.
3 1.0 The offset from the numerical labels (or from the axis is there are no numerical labels) at which to output the left Y axis label. The offset is in terms of character size.
4 "" The label to place on the upper X axis. This is ignored if the axis is a time-based axis.
5 1.0 The offset from the numerical labels (or from the axis is there are no numerical labels) at which to output the upper X axis label. The offset is in terms of character size.
6 "" The label to place on the right Y axis. This is ignored if the axis is a time-based axis.
7 1.0 The offset from the numerical labels (or from the axis is there are no numerical labels) at which to output the right Y axis label. The offset is in terms of character size.
NumOps - A list which specifies options used in the numerical labeling of the plot axes. The list has a maximum of 4 elements which are defined in the table below. Elements not specified are defaulted to the values given.
NumOps List Definition
INDEX DEFAULT DEFINITION
0 BOT Which X axes to output numerical labels on. The options are NONE for don't label either X axis, BOT to label only the lower X axis, TOP to label only the upper X axis, or BOTH to label both the lower and upper X axis.
1 LEFT Which Y axes to output numerical labels on. The options are NONE for don't label either Y axis, LEFT to label only the left Y axis, RIGHT to label only the right Y axis, or BOTH to label both the left and right Y axis.
2 BOTH Which X axes to output tick marks on. The options are NONE for don't tick either X axis, BOT to tick only the lower X axis, TOP to tick only the upper X axis, or BOTH to tick both the lower and upper X axis.
1 BOTH Which Y axes to output tick marks on. The options are NONE for don't tick either Y axis, LEFT to tick only the left Y axis, RIGHT to tick only the right Y axis, or BOTH to tick both the left and right Y axis.
ShowAxes - This is an optional input variable which is used to indicate whether to draw the X and Y axes in the plot. The default value is 1 which is to show the axes. Set to zero if the axes are not to be shown.
RETURN DEFINITION
NONE
DESCRIPTION
PlotOutlines outputs the plot axes, tick marks and all defined annotation associated pID. Which axes are to have tick marks and numerical labels applied to them is selected through NumOps. Axis text labels are set in LabOps. Only one label per axis can be set through LabOps. Additional labels can be added through calls to PLTaxisRec, PLTaxisPolar or PLTaxisMap depending on the type of plot defined. The plot axis can be left undrawn by setting ShowAxes to 0.
The characteristics of the labeling (size, color, etc) and tick marks (length, style, number, color, etc) can be changed through calls to PLTinfoChg. Basic default settings used in outputting labels and tick marks are: all output is done in white; all labels are output outside the axes; there are 10 major tick marks with each division having 5 minor tick marks (8 and 5 respectively for the azimuthal axis in polar plots); tick marks are drawn inside the axis with the exception of CROSSHAIR plots where the tick marks straddle the axis; and the format of numerical labels is set to %.1f on linearly scaled axes and the exponent is output on logarithmically scaled axis.
On plot axis which are declared time based the axis text label is autogenerated to indicate the time format.
Unless an axis has been autoscaled through a call to the procedure AutoScale the range associated the the different axes when outputting numerical labels is taken directly from the scaling of the graphics window the plot is associated with.
ERRORS
None Generated
C BACKING
No
EXAMPLE(S)
EXAMPLE 1: Examples of different plot annotations. Top example shows a plot with the X axis being time based. In the lower left-hand example both axes are linearly scaled while in the lower right-hand example the Y axis is logarithmically scaled
# READ the GUI preference settings

GUIprefsRead

# SET a window size

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

# START graphics

GraphicsOn TK RainBow

# ESTABLISH a graphics windows in lower left of canvas 

GenWindow 0 0.1  0.1  0.0 0.45  0.45 0.0 -6.0 -6.0 0.0 6.0 6.0 0.0

# IDENTIFY Window 0 with plot 0

DefinePlot 0 0 -1 -1 

# SET labels and number to 10 pt

PLTinfoChg 0 ALL NUMBERS NSIZE 10
PLTinfoChg 0 ALL NUMBERS TSIZE 10

# PUT up the plot annotation.

PlotOutlines 0 [list "X" 1.0 "Y" 1.0] [list BOT BOT BOTH BOTH]

# ESTABLISH a graphics windows in lower right of canvas 

GenWindow 1 0.55  0.1  0.0 0.90  0.45 0.0 -6.0 1.0 0.0 6.0 6.0e7 0.0

# LEFT Y-axis is set to LOG scaling 

SetAxis 1 PRIMARY HOLD HOLD HOLD HOLD HOLD HOLD HOLD LOG HOLD

# IDENTIFY Window 1 with plot 1

DefinePlot 1 1 -1 -1 

# SET labels and number to 10 pt

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

# PUT up the plot annotation.

PlotOutlines 1 [list "X" 1.0 "Y" 1.0] [list BOT BOT BOTH BOTH]

# SET beginning and ending time across the X axis in next plot.

set bT [list 2007 312 7 15 0 0]
set eT [list 2007 312 8 45 0 0]

# ESTABLISH a graphics windows across top of canvas

GenWindow 2 0.1  0.60  0.0 0.9  0.97 0.0 -6.0 1.0 0.0 6.0 10.0 0.0 X

# IDENTIFY Window 2 with plot 2 and X axis is time based.

DefinePlot 2 2 -1 -1 X $bT $eT 

# SET labels and number to 10 pt

PLTinfoChg 2 ALL NUMBERS NSIZE 10
PLTinfoChg 2 ALL NUMBERS TSIZE 10

# PUT up the plot annotation.

PlotOutlines 2 [list "X" 1.0 "Y" 1.0] [list BOT BOT BOTH BOTH]
      
EXAMPLE 2: Example of a plot with the axis output suppressed.
# READ the GUI preference settings

GUIprefsRead

# SET a window size

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

# START graphics

GraphicsOn TK RainBow

# ESTABLISH a graphics windows in lower right of canvas 

GenWindow 1 0.15  0.15 0.0 0.85 0.85  0.0 -6.0 1.0 0.0 6.0 10 0.0

# LEFT Y-axis is set to LOG scaling 

SetAxis 1 SECONDARY 10.0 10.0 HOLD -5 1.0e5 HOLD HOLD LOG HOLD

# IDENTIFY Window 1 with plot 1

DefinePlot 1 1 -1 -1 

# SET labels and number to 10 pt

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

# PUT up the plot annotation with axes not drawn.

PlotOutlines 1 [list "X" 1.0 "Y" 1.0] [list BOTH BOTH BOTH BOTH] 0
      
Mar 29, 2007