If you wish to produce a histogram use the command: TD:HISTOGRAM On the other hand if you wish to plot a smooth curve type: TD:JOIN For series of straight lines connecting the points: TD:JOIN 1 (1 segment per interval) To put a title at the top: TD:TITLE TOP 'This is my title' To put a title at the bottom: TD:TITLE BOTTOM 'This is the X axis' To put a title on the left: TD:TITLE LEFT 'This is the Y axis'
If you are done, you then type: TD:EXIT
Now you liked the plot, but you wish to change a few things. The commands you typed are in file TD.TDJ. You may edit this file to correct any mistakes you made. You also should rename it: $ RENAME TD.TDJ MYPLOT.TOP and invoke TOPDRAWER again. Now instead of typing all the commands in, just type: SET FILE IN 'MYPLOT' TOPDRAWER will re-execute the commands in the file. Now you wish to get the plots out on the Postscript printer. so you type: TD:SET DEVICE POSTSCR Then replot the data by typing: TD:SET FILE IN 'MYPLOT' Finally type: TD:EXIT
Now the plot is printed on the Talaris by: PRINT MYPLOT.PS
More plots may be added to the first plot by entering more data, and then
either PLOT, HISTOGRAM, or JOIN. Each command may be modified by extra
commands to make the plot more pleasing. For example if you type:
TD:HISTOGRAM DOTS RED
Then the histogram will be formed with red dotted lines. This is useful to
differentiate it from other previously plotted histograms.
philosophy
TOPDRAWER is designed to plot and manipulate data. It assumes that data
consists of X vs Y with errors DX, DY. It may be X,Y vs Z with errors
DX,DY,DZ. You may also specify NDX,NDY or NDZ the negative part of the
error bars separately from DX,DY or DZ. The data may be a histogram in
which case DX would be the bin width, or it may be a set of discrete points
with unrelated errors. You may plot the data accordingly.
There is also an auxiliary set of coordinates, that may be used for data manipulation, but not plotting. They are U,DU,NDU,V,DV,NDV,W,DW,NDW To plot the data in these coordinates they must be moved to X,Y,Z coordinates. This is easily done with the SWAP command.
The basic plotting operations are: 1. PLOT plots the data with optional error bars. 2. JOIN joins the data points with line segments. 3. HISTOGRAM plot the data as a histogram. 4. BAR plots the data as a bar chart (similar to a histogram)
operation
The following command invokes TOPDRAWER:
$ TOPDRAWER [filename [device1 [device2...]]] [/options]
If the filename is omitted you are prompted with
TD:
You then start typing in commands to TOPDRAWER.
If you start TOPDRAWER from a batch stream, the commands follow the $ TOPDRAWER command.
Additional Information on:
Normally PLOT_TERM is automatically set when you log in. It is not defined for a batch job. This means that TD uses your terminal when in interactive mode, and the Talaris while in a batch stream. The login procedure defines PLOT_TERM by asking the terminal for its ANSWERBACK message. This message must be set properly inside the terminal. You need to know how to SET-UP the ANSWERBACK message. For more information see:COMMANDS SET DEVICE
Additional Information on:
If you run TOPDRAWER interactively, but from an indirect command file, the input will be from the file that invoked TOPDRAWER. If you wish to have input from the terminal, you may assign TT: to SYS$INPUT temporarily by: $ ASSIGN /USER TT: SYS$INPUT $ TOPDRAWER
You should not do this in BATCH, as TT: is the default output for the graphics. You may get data from output files generated by histogram packages. For more information on this see:Command SET HISTOGRAM.
Some input may be made via the cross hair cursor. For example SHOW CURSOR brings up the cursor on your terminal. Move the cursor to the location you desire, and press any key except "Return" The current location of the cursor will be typed and entered into the journal file as a comment. Some other commands that use the cursor are ARROW, BOX, CIRCLE, ELLIPSE, TITLE, SET WINDOW, and SET LIMITS.
The input string may not be longer than 256 characters. If you need to omit columns or set up a special format for the commands: SET CARD and SET FORMAT.
For more information see:TOPDRAWER DATA.
output
TD produces the following output:
1. Plot - This may be on your terminal, LPA0:, another terminal, or a
file on disk. The plot data format and file is modified by the
command:
TD:SET DEVICE
Plot output for a device other than your terminal is a file whose
name matches the input file name, and whose type is assigned
according to the device. If there is no input file name, the
output file name is UGDEVICE. You can define logical name
TOPDRAWER_OUTPUT to specify a name of your choice.
File types are: CAL - Calcomp Microfiche HPGL - HPGL IMG - Imagen PS - Postscript PTX - Printronix Q - QMS REG - Regis, Gigi, etc. SIX - Sixels TEK - Tektronix VEP - Versatek XCL - Talarix EXCL
2. Listing - This lists all TD commands you used in a session. This
is normally TD.LIS, but the name may be changed by the command:
TD:SET FILE OUTPUT 'newfilename'
If you do not want a list file:
TD:SET MODE LIST OFF
or...
TD:SET FILE OUTPUT NL:
3. Journal - This file contains all commands entered interactively.
It is normally file TD.TDJ, but the name may be changed by the
command:
TD:SET FILE JOURNAL 'newfilename'
You may temporarily turn off journaling by:
TD:SET MODE JOURNAL OFF
4. Errors - A temporary file TOPDRAWER_ERRORS.DAT is used to save the
error messages for the current plot. This file is only opened for
interactive sessions.
5. Data - You may use the LIST command to output data sets suitable
for input to TOPDRAWER. If you do not specify the output file it
goes to the Listing (TD.LIS).
set_up
You may specify a setup file to initialize TOPDRAWER. This is done by
specifying the logical name TOPDRAWER_INIT. TOPDRAWER_INIT should point to
a file with TOPDRAWER commands to be executed when TD first starts. The
default file name is TDINIT.TOP. If you have a setup file then then
journal file and listing file are suppressed. You must start them in the
setup file if you want them.
example $ ASSIGN TDHBOOK TOPDRAWER_INIT
The file TDHBOOK.TOP contains the commands: TD:SET HIST HBOOK FILE="hbook.dat" TD:DEFINE KEY PF3 "SET HIST TITLE PREV;NEW;HIST"/TERMINATE TD:DEFINE KEY PF4 "SET HIST TITLE NEXT;NEW;HIST"/TERMINATE TD:SET FILE JOURNAL HISTS.TDJ
Now when you start TOPDRAWER your hbook histograms are already available, and keypad keys are defined to easily access them. Your journal file is HISTS.TDJ and you have no listing file.
You assign:
$ ASSIGN TOPDRAWER_INIT SYS$LOGIN
The file TDINIT.TOP in your root default login directory is used as the
TOPDRAWER initialization file.
data
TOPDRAWER accepts data in a variety of forms.
Additional Information on:
The DATA frame is not mapped to the TEXT frame until a plotting command or a command which uses the data frame is used. Plotting commands are JOIN, HISTOGRAM, PLOT and so on. Commands which use the data frame are ARROW DATA, BOX DATA, TITLE DATA and so on. If you wish to have TOPDRAWER automatically set the data frame, you should supply the data before any commands which reference the data frame.
Several commands modify the data frame, once it has been defined:
SET WINDOW
SET LIMITS
SET THREE
SET SIZE
SET SCALE
These commands allow you to overlay different plots with different scales.
Just reading in new data does not change the current data frame.
Fonts
There are several fonts available in the unified graphics. They are:
EXTENDED and DUPLEX.
The EXTENDED and DUPLEX support many sets of characters. The DUPLEX set is slow compared to the extended set, but it looks almost like printed characters if you use a high resolution device. The alternate character sets are determined by a character pair. The first character determines the actual character printer, the second one determines the case.
Additional Information on:
Axes are not automatically added to 3-d graphs so you must use the command PLOT AXES. You may turn each axis on separately using the SET AXIS command and then PLOT AXES X,Y,Z to place each axis in a convenient location.
The command SET THREE is used to specify the "viewpoint" of a 3-d plot. SET SCALE is also used to specify the range and type of scale to use along each of the X,Y,Z axes.
3-d plots may also be built from a series of 2-d plots. To do this you must provide z values and: TD:SET THREE ON Then either JOIN, HISTOGRAM or PLOT is used to plot the data. Normally Z is the dependent variable, and X,Y are the independent variables. If this rule is violated, 3-d histograms will not be correctly plotted. Your data may be moved with the SWAP command if you need to get it into the correct variables.
Additional Information on:
Additional Information on:
The lexicals may be abbreviated to the shortest unique name. For convenience V_ may be omitted inside an expression. This will increase the time to parse an expression. For example <V_XVALUE> is the same as <XVALUE> or V_XV.
Additional Information on:
Additional Information on:
1. Insert the following lines of code into your main program. INTEGER HCREATEG PARAMETER IHSIZE=100000 COMMON /PAWC/MEMORY(IHSIZE) ...... ISTAT=HCREATEG('region_name',MEMORY,IHSIZE) IF (ISTAT .le. 0) STOP 'Can not create region' CALL HLIMIT(IHSIZE) You may adjust the IHSIZE to the proper value.
2. When you link you must also include: TOPDRAWER_DIR:TD_GROUP/OPT To give users in your group only read access to your histograms. ISTAT=HCREATEG('region_name',MEMORY,-IHSIZE) or link using.... TOPDRAWER_DIR:TD/OPT TD_GROUP uses a modified version of HCREATEG rather than the standard CERN version. The modified one in addition to setting up group read/write protection on the section also prevents creation of the same global section by more than 1 person. It creates a new version instead. It will type out the name of the created global section. The modified version will create a read only section if -IHSIZE is passed to it.
To create a global section HCREATEG must open a scratch file. The modified version attempts to do this on SYS$SCRATCH:. By reassigning the scratch device you may put this file on a disk with enough quota. $ DEFINE SYS$SCRATCH USR$SCRATCH:[name]
For information about using the TD subroutines:
SEE:SUBROUTINES
Revisions
The original sources were written by:
Roger B. Chaffee
Computation Research Group
Stanford Linear Accelerator Center
Stanford, California
Modified: J. Clement All syntax has been "regularized" and extended for convenience.
Additional Information on:
You may wish to rename and delete some of the executables, if your system
lacks Xwindows or GKS.
1. TOPDRAWERMIN has neither Xwindows nor GKS support.
2. TOPDRAWER has Xwindows but not GKS.
3. TOPDRAWERGKS has both.
Author
This version is heavily modified from the original written by:
Roger B. Chaffee
Computation Research Group
Stanford Linear Accelerator Center
Stanford, California
U.S.A.
The original docuementation is: CGTM 178 - November 1980
This version was written by: John Clement Bonner Nuclear Lab Rice University P.O. Box 1892 Houston, Tx, 77251 (713) 527-8101 x 2037 Internet: CLEMENT@PHYSICS.RICE.EDU Bitnet: CLEMENT@RICEVM1 Hepnet: FNBIT::RIPHYS::CLEMENT or... RIPHYS::CLEMENT