ActiveAxes TCL UTILITIES USER MANUAL ActiveAxes
SYNOPSIS
Select the active window axes
PACKAGE
TCLGPH
NAME
ActiveAxes
USAGE
ActiveAxes  wnID aX aY
INPUT DEFINITIONS
wnID - The id of the window where the axes are to be activated.
aX - The X axis to be activated. Activate the PRIMARY X axis by setting the input to either Xb or Xp. Activate the SECONDARY X axis by setting the input to either Xt or Xs. Keep the current active X axis by setting the input to Xc.
aY - The Y axis to be activated. Activate the PRIMARY Y axis by setting the input to either Yb or Yp. Activate the SECONDARY Y axis by setting the input to either Yt or Ys. Keep the current active Y axis by setting the input to Yc.
RETURN DEFINITION
NONE
DESCRIPTION
ActiveAxes sets the aX and aY window axis to be the currently active a plotting axes. All output to the window is plotted against these axes.
ERRORS
None Generated
C BACKING
No
EXAMPLE(S)
EXAMPLE 1:Establish a graphics window with different scaling for the 4 axes then plot a box while varying the active axes.
# 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 -4.0 0.0 8.0 6.0 0.0
SetAxis 0 SECONDARY -12.0 -7.0 0.0 5.0 10.0 0.0 HOLD HOLD HOLD 0

# DRAW a BOX in the window in white 

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

# CHANGE the current active axis to the PRIMARY X and SECONDARY Y axis

ActiveAxes 0 Xp Ys

# REDRAW the same box but in yellow

PlotColor HOLD $GphInfo(Yellow) HOLD
Box 0 -3.0 -3.0 0.0 3.0 3.0 0.0

# CHANGE the current active axis to the SECONDARY X and SECONDARY Y axis

ActiveAxes 0 Xs Ys

# REDRAW the same box but in green

PlotColor HOLD $GphInfo(Green) HOLD
Box 0 -3.0 -3.0 0.0 3.0 3.0 0.0

# CHANGE the current active axis to the SECONDARY X and PRIMARY Y axis

ActiveAxes 0 Xs Yp

# REDRAW the same box but in cyan

PlotColor HOLD $GphInfo(Cyan) HOLD
Box 0 -3.0 -3.0 0.0 3.0 3.0 0.0
      
Feb 23, 2007