DefinePlot TCL UTILITIES USER MANUAL DefinePlot
SYNOPSIS
Define a plot
PACKAGE
TCLPLT
NAME
DefinePlot
USAGE
DefinePlot  pID wID {gX} {gY} {TmAxis} {TmB} {TmE}
INPUT DEFINITIONS
pID - The plot iD being defined
wID - The window iD with which pID is associated.
gX - An optional input that specifies the the number of grids across the X axis of the plot. This is defaulted to -1 which is sets the number of grids to the number of pixels across the plot. The value is used when auto plotting from a defined grid of variables.
gY - An optional input that specifies the the number of grids across the Y axis of the plot. This is defaulted to -1 which is sets the number of grids to the number of pixels across the plot. The value is used when auto plotting from a defined grid of variables.
TmAxis - A optional input that specifies which if any of the plot axes are time based. The default value is set to NONE. To specify that the X axis is time based set to X. To specify that the Y axis is time based set to Y.
TmB - A optional input that specifies the time of the first pixel in on a time based axis. The default value is -1 which assumes that TmAxis has be set to NONE. The time is input as a list of the form [Year, Day, Hour, Minute, Second, Millisecond].
TmE - A optional input that specifies the time of the last pixel in on a time based axis. The default value is -1 which assumes that TmAxis has be set to NONE. The time is input as a list of the form [Year, Day, Hour, Minute, Second, Millisecond].
RETURN DEFINITION
NONE
DESCRIPTION
DefinePlot associates a plot identifier pID with a defined window identifier wID. The plot itself is consists of a grid which is gX x gY grids in the X and Y and directions. Setting gX and/or gY to -1 sets the grid sizes to the be number of pixels in the plot along that direction. The grid information is used primarily with time based axes and when auto-plotting pre-gridded data.
The routine assumes that the plot being defined is a CARTESIAN plot. If this is not the case the plot format should be set prior to invoking DefinePlot by calling PLTinfoChg and setting the AXIS FORMAT. DefinePlot sets all plot variables which have not previously been set to reasonable default values based in the current plot format. These can be changed at anytime prior to usage (generally in a call to PlotOutlines).
ERRORS
None Generated
C BACKING
No
EXAMPLE(S)
EXAMPLE 1: Examples of different plots format. With the exception of the plot format and the sizes of the output plot annotations, these use the default setups established in the call to DefinePlot.
# 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 3 graphics windows, CROSSHAIR, POLAR, and a time based
#   CARTESIAN plot with time running along the X axis.

# SET plot format to CROSSHAIR

PLTinfoChg 0 ALL AXIS FORMAT CROSSHAIR

# OPEN plot window in lower left-hand corner 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

# ASSOCIATE plot with window.

DefinePlot 0 0 -1 -1 

# CHANGE all annotation size to 10pt

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

# PUT up plot axes and annotation

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

# SET plot format to POLAR

PLTinfoChg 1 ALL AXIS FORMAT POLAR

# OPEN square plot window in lower right-hand corner of canvas

SqWindow 1 0.55  0.1  0.0 0.35 -6.0 -6.0 0.0 6.0 6.0 0.0

# ASSOCIATE plot with window.

DefinePlot 1 1 -1 -1 

# CHANGE all annotation size to 10pt

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

# PUT up plot axes and annotation

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

# SET up start and stop times for a time based axis

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

# OPEN plot window across upper portion of canvas. X axis scaling is set to
#   the number of pixel along axis which is proper setting for a time-based
#   axis.

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

# ASSOCIATE plot with window.

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

# CHANGE all annotation size to 10pt

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

# PUT up plot axes and annotation

PlotOutlines 2 [list "X" 1.0 "Y" 1.0] [list BOT BOT BOTH BOTH]
      
Apr 3, 2007