SetAxis TCL UTILITIES USER MANUAL SetAxis
SYNOPSIS
Modify a set of window axis scaling
PACKAGE
TCLGPH
NAME
SetAxis
USAGE
SetAxis  wnID axID sX1 sY1 sZ1 sX2 sY2 sZ2 ScaX ScaY ScaZ {Activate}
INPUT DEFINITIONS
wnID - The window iD whose axes scaling are to be modified.
axID - The axes being modified. Set to PRIMARY to modify the lower X and left Y axis. Set to SECONDARY to modify the upper X and right Y axis.
sX1 - The value associated with the left-most point of the X axis. Set to HOLD to keep the current value.
sY1 - The value associated with the bottom-most point of the Y axis. Set to HOLD to keep the current value.
sZ1 - The value associated with the nearest point of the Z axis. Set to HOLD to keep the current value. This value is ignored in the TK driver but may not be in the VTK driver.
sX2 - The value associated with the right-most point of the X axis. Set to HOLD to keep the current value.
sY2 - The value associated with the top-most point of the Y axis. Set to HOLD to keep the current value.
sZ2 - The value associated with the deepest point of the Z axis. Set to HOLD to keep the current value. This value is ignored in the TK driver but may not be in the VTK driver.
ScaX - The scaling to use along the X axis being modified. This is either LINEAR or LOG. Set to HOLD to keep the current value.
ScaY - The scaling to use along the Y axis being modified. This is either LINEAR or LOG. Set to HOLD to keep the current value.
ScaZ - The scaling to use along the Z axis being modified. This is either LINEAR or LOG. Set to HOLD to keep the current value. This value is ignored in the TK driver but may not be in the VTK driver.
Activate - Optional input variable which allows axis modifications to be immediately activated. The default values is 0 which causes the changes to be made to the axis parameters without activating them. A value of 1 activates the changes. This also causes the modified axes to be become the currently active axes for all graphics output in the window wnID and is similar to a call to ActiveAxes.
RETURN DEFINITION
NONE
DESCRIPTION
SetAxis modifies the limits and scaling along the pair of window axis axID in wnID. A window has two sets of X and Y axes corresponding to its four sides. Modifying the PRIMARY axes changes the bottom X and left Y axis while modifying the SECONDARY axes changes the top X and right Y axis. Entering any of the limit or scaling parameters as HOLD causes the current value of that parameter on the axis to be unchanged. The changes can be made to be immediately active by setting Activate to 1. Leaving it as 0 causes the changes to be registered but not activated. They must be activated then by a call to the routine ActiveAxes
ERRORS
None Generated
C BACKING
No
EXAMPLE(S)
EXAMPLE 1: Set up a window to cover the entire canvas. Draw a box in it. Rescale the PRIMARY axes and then redraw the same box.
# INITIALIZE the default gui 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 window coverting the whole canvas 

GenWindow 0 0.0 0.0 0.0 1.0 1.0 1.0 -6.0 -6.0 0.0 6.0 6.0 0.0

# DRAW a BOX in the window in white 

PlotColor HOLD $GphInfo(White) HOLD
Box 0 -4.0 -4.0 0.0 4.0 4.0 0.0

# CHANGE the PRIMARY axis scaling in the window and activate the changes

SetAxis 0 PRIMARY -8.0 -8.0 0.0 8.0 8.0 0.0 HOLD HOLD HOLD 1

# REDRAW the same box but in yellow

PlotColor HOLD $GphInfo(Yellow) HOLD
Box 0 -4.0 -4.0 0.0 4.0 4.0 0.0
      
Feb 22, 2007