.CHAPTER TEKGRAPH Users Manual .IF NBI .RM70 .LM0 .NOJUSTIFY .ENDIF NBI .IFNOT NBI .RM72 .LM5 .ENDIF NBI .fl bold .headers on .sthl ,0 .layout 2,2 .nmpg 2 .dnm RL .lm8 .pg .blank 5 .center 78;Table of Contents .blank 2 .NF.NJ .PS,70.LM8 1.0 Introduction . . . . . . . . . . . . . . . . . . . . 2 2.0 Differences Between GRAPH And TEKGRAPH . . . . . . . 3 3.0 Use Of TEKGRAPH . . . . . . . . . . . . . . . . . . 6 4.0 Interactive Use Of TEKGRAPH . . . . . . . . . . . . 7 5.0 Graphics Data File Format . . . . . . . . . . . . . 8 6.0 Graph Control File Format . . . . . . . . . . . . . 9 7.0 Command File Commands . . . . . . . . . . . . . . 10 8.0 AG II Command File Options . . . . . . . . . . . . 11 8.0.1 BINITT . . . . . . . . . . . . . . . . . . . . 11 8.0.2 CHECK . . . . . . . . . . . . . . . . . . . . 11 8.0.3 DSPLAY . . . . . . . . . . . . . . . . . . . . 11 8.0.4 CPLOT . . . . . . . . . . . . . . . . . . . . 12 8.0.5 FRAME . . . . . . . . . . . . . . . . . . . . 12 8.1 DINITX and DINITY . . . . . . . . . . . . . . . 12 8.1.1 DLIMX and DLIMY . . . . . . . . . . . . . . . 13 8.1.2 SLIMX and SLIMY . . . . . . . . . . . . . . . 13 8.1.3 PLACE . . . . . . . . . . . . . . . . . . . . 14 8.2 HBARST and VBARST . . . . . . . . . . . . . . . 15 8.2.1 SIZEL . . . . . . . . . . . . . . . . . . . . 15 8.3 HLABEL . . . . . . . . . . . . . . . . . . . . . 16 8.3.1 VLABEL . . . . . . . . . . . . . . . . . . . . 16 8.3.2 NOTATE . . . . . . . . . . . . . . . . . . . . 17 8.4 LINE . . . . . . . . . . . . . . . . . . . . . . 17 8.4.1 SYMBOL . . . . . . . . . . . . . . . . . . . . 18 8.4.2 SIZES . . . . . . . . . . . . . . . . . . . . 18 8.4.3 STEPL . . . . . . . . . . . . . . . . . . . . 19 8.4.4 STEPS . . . . . . . . . . . . . . . . . . . . 19 8.5 XFRM and YFRM . . . . . . . . . . . . . . . . . 19 8.5.1 XLEN and YLEN . . . . . . . . . . . . . . . . 20 8.5.2 XLAB and YLAB . . . . . . . . . . . . . . . . 20 8.6 XLOC and YLOC . . . . . . . . . . . . . . . . . 20 8.6.1 XTYPE and YTYPE . . . . . . . . . . . . . . . 21 .pg .blank 5 .lit .end literal .center 78;Table of Contents .blank 2 9.0 TCS Command File Options . . . . . . . . . . . . . 22 9.0.1 ERASE . . . . . . . . . . . . . . . . . . . . 22 9.0.2 HDCOPY . . . . . . . . . . . . . . . . . . . . 22 9.1 DRAWA . . . . . . . . . . . . . . . . . . . . . 22 9.1.1 DRAWR . . . . . . . . . . . . . . . . . . . . 23 9.1.2 DRWABS . . . . . . . . . . . . . . . . . . . 23 9.1.3 DRWREL . . . . . . . . . . . . . . . . . . . 23 9.2 MOVEA . . . . . . . . . . . . . . . . . . . . . 24 9.2.1 MOVER . . . . . . . . . . . . . . . . . . . . 24 9.2.2 MOVABS . . . . . . . . . . . . . . . . . . . 24 9.2.3 MOVREL . . . . . . . . . . . . . . . . . . . 25 9.3 SCURSR . . . . . . . . . . . . . . . . . . . . . 25 9.3.1 VCURSR . . . . . . . . . . . . . . . . . . . . 25 9.3.1 VCURSR . . . . . . . . . . . . . . . . . . . . 25 10.0 Internal TEKGRAPH Command File Options . . . . . . 26 10.0.1 BOX . . . . . . . . . . . . . . . . . . . . . 26 10.0.2 CLOSE . . . . . . . . . . . . . . . . . . . . 26 10.1 DATAI . . . . . . . . . . . . . . . . . . . . . 26 10.1.1 DATAO . . . . . . . . . . . . . . . . . . . . 26 10.2 ERRBAR . . . . . . . . . . . . . . . . . . . . . 27 10.3 PRINT . . . . . . . . . . . . . . . . . . . . . 27 10.3.1 PRTABS . . . . . . . . . . . . . . . . . . . . 28 10.4 TITLE . . . . . . . . . . . . . . . . . . . . . 28 10.4.1 TITABS . . . . . . . . . . . . . . . . . . . . 28 10.5 XLIMIT and YLIMIT . . . . . . . . . . . . . . . 29 10.6 WAIT And NOWAIT . . . . . . . . . . . . . . . . 29 11.0 TEKGRAPH Control File Example . . . . . . . . . . 30 12.0 Brief List of Command File Options . . . . . . . . 32 .blank .lm 5 .etc .etc .fl index ~ .fl subindex ~ .xl .ap .pg .nmpg 2 .dnm D .hl 1 Introduction As discussed in memo JGDM-137, the PLOT10/TCS/Advanced Graphics subroutine library has been modified to also support graphics on VT125/VT240 terminals (ReGIS graphics devices). The first program to use these new terminal independent graphics subroutines is GRAPH. In addition, GRAPH's functionality has been improved to make it more user friendly. The new version of the program is called TEKGRAPH. The name has been changed to avoid conflict with a new DEC program which is also invoked via the name GRAPH (DEC is building it into the DCL command dispatcher). The first version of GRAPH was written by Dave Danials 5 years ago for our PDP-11/45 computer. Because of the severe address space limitations on a 16 bit machine, it was difficult to use PLOT 10/Advanced Graphics subroutines within a Fortran mainline program. The function of GRAPH was to create a separate graphics display task incorporating the Plot10 Advanced Graphics calls. At its core, GRAPH is a command dispatcher of a limited set of TCS and Advanced Graphics subroutine calls. Since the PLOT10 library on the 11/45 system had many functions dummied out, GRAPH was more limited in functionality than TEKGRAPH which is built against a full function PLOT10 library. For those of you who are familiar with GRAPH, a brief discussion of the differences between GRAPH and TEKGRAPH will be presented. For users not familiar with GRAPH a detailed discussion of how to use TEKGRAPH will be given. Included will be a complete set of TEKGRAPH control file commands as well as detailed examples of how to create and use control files. .pg .hl 1 Differences between GRAPH and TEKGRAPH The majority of differences between GRAPH and TEKGRAPH are enhancements. So that a ready list of behavioral differences is easy to find, the differences between GRAPH and TEKGRAPH are as follows. .x Differences GRAPH / TEKGRAPH .x Differences GRAPH / TEKGRAPH~How invoked~Foreign command .list .le;If invoked as a foreign command, .lit $ TEKGRAPH control_file .end literal GRAPH would assume a control file extension of .CMD. TEKGRAPH assumes an extension of .CTL (for control). If an explicit extension is included in the control file name, both GRAPH and TEKGRAPH will use the explicit extension. .x Differences GRAPH / TEKGRAPH~How invoked~No command .le;If TEKGRAPH is invoked with no command line, and the symbol GRAPH__FILE does not exist, TEKGRAPH will assume the file name is GRAPH.DAT. However, TEKGRAPH will first prompt for a file name displaying the current default file name setting (GRAPH.DAT). If a carriage return is typed, TEKGRAPH will now act just the way GRAPH did before, ie it will display a list of options (Delete, Merge, etc.) and line/point options. This mode can be used for graphically editing a graphics data set. .x Differences GRAPH / TEKGRAPH~Subroutine like If an explicit filename is entered, TEKGRAPH assumes you want to do something special with the file and then asks you if you want to create a graph control file. If you do not, TEKGRAPH behaves like GRAPH and displays the editing option menu. However, if you choose to, TEKGRAPH then proceds to prompt with a large number of questions (axis type, data limits, point type, line type, comments, etc.) which it then uses to display the graph. This mode can be used for producing a polished graph from an existing data set. .le;TEKGRAPH is designed to be used in a subroutine-like fashion from a main calling program. The main program can spawn commands to TEKGRAPH in two ways. First, the main program can create a graph control file, my__file.CTL, containing the appropriate Advanced-Graphics commands. Then the main program can spawn the command _$TEKGRAPH my__file.CTL, and the graph will be plotted. If the user does not wish to be bothered with prompting for a data file name, one can set the symbol GRAPH__FILE to be the name of the data file and then spawn off the command, _$TEKGRAPH, with no control file name on the command line. In this event, TEKGRAPH will not prompt for a file name but it will .x Differences GRAPH / TEKGRAPH~VT-125 / 240 cursor control prompt for whether or not a control file should be used. .le;When run on a VT125 (also VT240) terminal, TEKGRAPH has the ability to move its cursor (when displayed) via the arrow keys. The movement produced by the arrow keys is rate sensitive. The faster you move the keys, the larger steps the cursor moves. If the interval between hitting an arrow key is faster than .3 seconds, each time a key is hit, the interval the cursor moves increases by 2 (up to 25). If the interval is longer, each time the interval decreases by 5 (down to 1). This allows for fast and accurate positioning of the cursor with the arrow keys. .x Differences GRAPH / TEKGRAPH~Terminal type .le;If TEKGRAPH does not know what type of terminal it is on, it will prompt for the terminal type. At this time it only knows about 4014 and VT125 terminals. However, this feature can be used from within an indirect command procedure (or batch) to have TEKGRAPH output data in either 4014 or ReGIS mode to a text file which can be displayed later. At present, TEKGRAPH does not know about VT100's which can emulate a Tektronix 4014. TEKGRAPH knows what terminal device it must output the graph to, by using the information about terminal type set via the SET TERM/DEVICE=XYZ command. Current graphic devices are the VT125 or FT1 (Foreign terminal 1, for Tektronix 4014 terminals). .x Differences GRAPH / TEKGRAPH~ERRBAR command .le;TEKGRAPH has the ERRBAR command. This enables error bars to be plotted at each point. Use of the ERRBAR command assumes the errors can be described by a constant fractional error for the X-data and Y-data. .x Differences GRAPH / TEKGRAPH~WRAP / NOWRAP status .le;Terminals using GRAPH had to be set for NOWRAP. TEKGRAPH finds the initial terminal WRAP/NOWRAP status, sets the terminal for NOWRAP while it is running, and on exit, restores the terminal's initial WRAP/NOWRAP status. .x Differences GRAPH / TEKGRAPH~HDCOPY command .le;The HDCOPY command can not work on a VT125/VT200 terminal unless a printer is attached to the printer port. Hardcopies may be made using the 8-V MUX and the video hard copy printer. If a command of the form _$TEKGRAPH Ctrl__File is issued for a VT125/VT2xx terminal, TEKGRAPH will display the graph and wait for a return to be hit, thus allowing time for a user to signal the 8-V Mux to make a copy of the screen. .x Differences GRAPH / TEKGRAPH~Aborted by CTRL/Y .le;When aborted with a CTRL/Y, TEKGRAPH erases the screen before returning the user to the DCL level. .x Differences GRAPH / TEKGRAPH~Graphics status .le;To insure that a VT125/VT2xx terminal is useable for entering commands, the terminal must always be switched back from graphic format to non-graphic format when a graphic program exits (no matter how). Consequently, when TEKGRAPH exits on a ReGIS terminal, it erases the screen whereas when it exits on a 4014 terminal, it does not erase the screen. To insure adequate viewing time for the graph on a ReGIS terminal, TEKGRAPH waits for the user to hit RETURN before it exits (and erases the screen) when creating a graph from a control file. .x Differences GRAPH / TEKGRAPH~/WAIT & /NOWAIT .le;TEKGRAPH has command line switches /WAIT and /NOWAIT which set (if present) whether TEKGRAPH waits for a return to be hit after plotting a graph in command line mode before exiting. These switches override the default, terminal-dependent settings. Their function is identical to the control file commands WAIT and NOWAIT. .x Differences GRAPH / TEKGRAPH~Exit handler .le;TEKGRAPH establishes an exit handler so that when it exits or when CTRL/Y is typed, it will return a ReGIS mode terminal (VT125/VT240) to a defined state. This involves eraseing the graphics screen on ReGIS terminals so that terminal input is again possible. .end list .pg .hl 1 Use of TEKGRAPH .x Use of TEKGRAPH TEKGRAPH can be used in three ways; to graph data sets based on commands in a graph control file, to create graph control files, and to interactively edit and merge graphic data files. TEKGRAPH can either be invoked transparently from the Graph Master Menu (the VPW Graphics workstation), or independently by defining the symbol .x Use of TEKGRAPH~Symbol definition .lit $ TEKGRAPH:=$SYS$UTILITY:TEKGRAPH .END LITERAL .x Use of TEKGRAPH~Modes~interactive TEKGRAPH has two primary modes, command line mode, and interactive mode. The interactive mode is started up if the TEKGRAPH command line is empty, ie it is invoked by typing .lit $ TEKGRAPH .end literal However, one may also type .x Use of TEKGRAPH~Modes~command or control .lit $ TEKGRAPH Control_File or $ TEKGRAPH/WAIT Control_File $ TEKGRAPH/NOWAIT Control_File .end literal If there is no explicit extension on the Control__File name, the extenstion .CTL will be assumed. If the file exists, TEKGRAPH will open it up and read its commands from it. At this time the wait control switches are the only command line switches supported. .x Differences GRAPH / TEKGRAPH~Terminal type .x Terminal types~How determined When TEKGRAPH is first invoked, it requests VMS to tell it what type of terminal it is running on. At this time either VT125's or Tektronix 4014 terminals (FT1 type) are known to TEKGRAPH (PLOT125 subroutines). If the terminal is any other type (or inadvertently set to the wrong type), the following message will appear. .lit Warning -- Terminal type does not support graphics Graphics protocol to simulate (ReGIS/Plot10): .end literal At this point either the user should enter either a R for ReGIS (VT-125/VT2xx) or P for Plot10 (Tektronix 4010,4014). .pg .x Use of TEKGRAPH~Modes~interactive .HL 1 Interactive Use of TEKGRAPH If there is no command file on the command line invoking TEKGRAPH, TEKGRAPH will erase the screen and prompt for a data file to plot. .lit Plot file name ( => GRAPH.DAT, ^Z => Exit): .end literal If _^Z is entered, TEKGRAPH erases the screen and exits. If a carriage return is hit, TEKGRAPH assumes you do not want to create a control file for plotting the data, and immediately drops into the Graphics Editing Menu. At this point, simply typing a return, will tells TEKGRAPH to prompt for format to display the data (line or point) and to then to produce a basic display of your data. After each graph is displayed, the graphics cursor will display on the screen. Hitting RETURN will return you to the Graphics Editing Menu. Additional graphics editing capabilities will be discussed later. However, if a file name is entered, TEKGRAPH assumes you may want to design a plot control file and prompts .lit Specify the GRAPH plot format [Y/N]: .end lit If the first letter of the answer is not "Y", TEKGRAPH drops into the Graphics Editing Menu and behaves as discussed above. However, if the answer is "Y", TEKGRAPH checks to see if a control file already exists. It tests for the existance of a control file by stripping the extension off of the data file specified and adding a .CTL extension. If a control file with that name already exists TEKGRAPH prompts .lit Use the existing graph control file [Y/N]: .end literal If the answer is "Y", TEKGRAPH plots the data using the existing control file, waits for you to hit RETURN, erases the screen and exits. If no control file existed initially, or if one does not choose to use the existing control file, TEKGRAPH will display the current data file name and the name of the control file it will create and then procede to ask a series of questions as to the format in which one wishes to plot the data. When these questions are completed, the data will be plotted using that format, TEKGRAPH will wait for a RETURN to be hit, and then will erase the screen. .pg .x Graphics Data File~Format .hl 1 Graphics Data File Format TEKGRAPH requires a data file to have a certain format. Data files for TEKGRAPH can be created by a program or interactively created and edited using the graphics data file editor accessed by the Graph Master Menu (see memo JGMD139). The data files are unformatted, sequential access files. For users who plan to create data files as output from their own VAX programs, the following data file format is required. .lit Variable Total type Bytes record 1 Inull,Ctitle I*2 + C*70 = 72 record 2 Isequence,Real_Xval,Real_Yval I*2 + R*4 + R*4 = 10 .... ....... , ........ , ....... I*2 + R*4 + R*4 = 10 record n Isequence,Real_Xval,Real_Yval I*2 + R*4 + R*4 = 10 where Inull INTEGER*2 0 Ctitle CHARACTER*70 Optional title for graph Isequence INTEGER*2 Sequence number of data pair, 1...600 Real_Xval REAL*4 Real X coordinate Real_Yval REAL*4 Real Y coordinate .end literal .x Graphics Data File~Number of data pairs At this time, only 600 pairs of (X,Y) data points are allowed, and the above is the only data file format that is allowed. At some future time, additional data file formats providing for additional capabilities may be added. However, to allow for additional file formats, the value of Inull must be zero. If using Fortran, the data file should be created in the following way. The graphics file title is written to the data file after the file has been opened then the data is written. The following is an example of how to open the file and write the title and data from Fortran : .x Graphics Data File~Fortran~How to create .x Graphics Data File~Fortran~Create title .x Graphics Data File~Fortran~Open file .x Graphics Data File~Fortran~Write data .lit REAL*4 Xval,Yval ! Required data file format C ! INTEGER*2 INULL ! This is the first 2 bytes C ! in the title. INTEGER*2 Isequence ! Required data file format C ! CHARACTER*70 CTITLE ! Remaining 70 bytes in ! the title (total 72 bytes). C ! DATA INULL /0/ ! Load INULL with a 0 DATA LUNF /1/ ! C ! OPEN( Unit = LUNF, ! Open up our - Name = 'file_name', ! data file - Status = 'NEW', ! so we can write - Form = 'UNFORMATTED') ! to it. C ! WRITE(LUNF)INULL,CTITLE ! Write title to file C ! C ! Now we write the data WRITE(LUNF)Isequence,Xval,Yval ! Note. no format stmt WRITE(LUNF)Isequence,Xval,Yval ! Note. no format stmt WRITE(LUNF)Isequence,Xval,Yval ! Note. no format stmt WRITE(LUNF)Isequence,Xval,Yval ! Note. no format stmt C ! Write till we are out C ! of data. .end literal .pg .x Use of TEKGRAPH~Modes~command or control .x Graph Control File~format .hl 1 Graph Control File Format A TEKGRAPH control or command file consists of a sequential ASCII formatted text file with one command per line. Commands are executed sequentially one after the other until the end of the file at which point TEKGRAPH waits for the user to press RETURN and then exits. A control file can input data from multiple data files and plot that data with any axis type, line style, or symbol type at any location of the screen. TEKGRAPH can produce basic control files which can plot a single data set. More elaborite control files can be created by combining control files together. Each line of the control file consists of a command followed by one or more options. The syntax and naming conventions are almost identical with the TCS/Advanced-Graphics subroutine calling conventions. If one had a subroutine XYZ and the call was .lit CALL XYZ(A,B,C) .end literal .x Graph Control File~Example .tp 3 the control file line would read .lit XYZ A,B,C .end literal At a minimum, each control file must consist of .lit BINITT ! Initialize TCS DATAI input_file ! Input data file < additional Commands> .............. < additional Commands> CHECK ! check and scale data DISPLY ! Display the data .END LIT Please note, comment lines (a "!" followed by text) are not allowed in control files and are included above only for clarification. Since TEKGRAPH can be used to generate a prototype control file, it can be used as a starting point for generating your own specialized control file. .pg .x Graph Control File~commands .hl 1 Command File Commands TEKGRAPH can create basic plot control files. However, elaborate control files can be created for plotting many data files on a single plot in a wide variety of ways. For creating a control file and understanding the commands, you will need to get a copy of the TCS manual, and the Advanced Graphics manual. In the appendix of this document is a complete comment list from the suboutine GRAPH in TEKGRAPH and a very brief description of the various calls. .pg .fl underline .eun .hl 1 ^& __AG__II__Command__File__Options__ \& .dul .hl 3 BINITT ~BINITT must be the first command in each control file. It initializes the Advanced Graphics common blocks and finds out which graphics protocol ot use when called the first time. BINITT may be called at any time to reset the table values back to the default values. .lit Command file format: .end literal .fl bold .ebo ^*BINITT\* .dbo .hl 3 CHECK Prior to displaying data, ~CHECK is used to scale the data to the graph window and also calculates the width and position of the labels based of the room available plus calculating the grid parameters. .lit Command file format: .end literal .fl bold .ebo ^*CHECK\* .dbo .tp 12 .hl 3 DSPLAY After the ~CHECK command the ~DSPLAY command is issued to plot the data, axis, etc. DSPLAY sets up the window, plots the curve, draws the grid, and labels each set of major tic marks. .lit Command file format: .end literal .fl bold .ebo ^*DSPLAY\* .dbo .lit ** NOTE ** CHECK and DSPLAY should be called only once per plot. .end literal .tp 13 .hl 3 CPLOT ~CPLOT plots a curve using the data window location values currently in COMMON. It does not draw the grid or labels or alter scale factors that determine which data is plotted. For multiple curves on the same graph the user should call DSPLAY for the first curve and CPLOT for all additional curves. If the data vlaues exceed the window boundaries as defined in the COMMON Table, the curve will be clipped. .lit Command file format: .end literal .fl bold .ebo ^*CPLOT\* .dbo .tp 11 .hl 3 FRAME ~FRAME will cause a frame around the window. Normally, if short tic marks have been specified (without grid lines), the sides of the data window opposite the axes will not be framed. In this case, calling FRAME will add these lines. .lit Command file format: .end literal .fl bold .ebo ^*FRAME\* .dbo .tp 12 .hl 2 DINITX _and DINITY ~DINITX and ~DINITY are used if one has multiple curves with multiple scales which must occur on the same graph. For example, DINITX will reinitialize the labels on the X axis. This will allow a new curve (with a new scale to be drawn). .lit Command file format: .end literal .fl bold .ebo ^* .lit DINITX DINITY .end literal .dbo .tp 14 .hl 3 DLIMX _and DLIMY ~DLIMX and ~DLIMY are used to set the minimum and maximum X and Y values to use in plotting the data. It can be used to set the display window or to clip data outside the minimum and maximum range. .lit Command file format: .end literal .fl bold .ebo ^* .lit DLIMX RXmin,RXmax DLIMY RYmin,RYmax .end literal .dbo .lit where RXmin,RXmax = Minimum X, Maximum X values RYmin,RYmax = Minimum Y, Maximum Y values .end literal .tp 12 .hl 3 SLIMX _and SLIMY ~SLIMX and ~SLIMY set the screen limits for Xmin, Xmax and Ymin, Ymax. .lit Command file format: .end literal .fl bold .ebo ^* .lit SLIMX IXmin,IXmax SLIMY IYmin,IYmax .end literal .dbo .lit where IXmin,IXmax = Minimum X, Maximum X screen values IYmin,IYmax = Minimum Y, Maximum Y screen values .end literal .tp 34 .hl 3 ~PLACE This routine sets the values of the screen minimums and maximums in COMMON to place the screen window at a predefined location on the display area. .lit Command file format: .end literal .fl bold .ebo ^*PLACE (LIT)\* .dbo .lit where LIT = is a literal string of three characters specifying the window location desired. (See following table) Location Value Ival Screen Coordinates (literal) I*4 XMIN XMAX YMIN YMAX ---------------------------- Standard (STD) 1 ! 150 900 150 700 Upper Half (UPH) 2 ! 150 850 525 700 Lower Half (LOH) 3 ! 150 850 150 325 Upper Left 1/4 (UL4) 4 ! 150 450 525 700 Upper Right 1/4 (UR4) 5 ! 650 950 525 700 Lower Left 1/4 (LL4) 6 ! 150 450 150 325 Lower Right 1/4 (LR4) 7 ! 650 950 150 325 Upper Left 1/6 (UL6) 8 ! 150 325 525 700 Upper Center 1/6 (UC6) 9 ! 475 650 525 700 Upper Right 1/6 (UR6) 10 ! 800 975 525 700 Lower Left 1/6 (LL6) 11 ! 150 325 150 325 Lower Center 1/6 (LC6) 12 ! 475 650 150 325 Lower Right 1/6 (LR6) 13 ! 800 975 150 325 If preferred, the user may enter the number of the location as represented by Ival in the table above. .end literal .tp 25 .hl 2 ~HBARST _and ~VBARST Bar charts may be specified using one of two routines, HBARST for horizontal bars or VBARST for vertical bars. The same results could be obtained by using LINE to specify bar chare, XFRM or YFRM to suppress the grid lines parallel to the bars, SYMBL to specify the type of shading lines in the bar, SIZEL to specify the width of the bar, and Sizes to specify the distance between the shading lines. The format of the command is; .lit Command file format: .end literal .fl bold .ebo ^* .literal HBARST Ishade,Iwbar,Idbar VBARST Ishade,Iwbar,Idbar .end literal .dbo .lit where Ishade = Shading type (0 - 15) Iwbar = The width of the bar in raster units. The width must be greater than 1, but 0 will result in a default width of 40 raster units. Idbar = The distance between the shading lines in raster units. The distance must be greater than 2, however, if a zero is entered, a default width of 20 raster units results. .end lit .tp 11 .hl 3 ~SIZEL The SIZEL command sets the width of the bar used for bar charts. .lit Command file format: .end literal .fl bold .ebo ^*SIZEL value\* .dbo .lit where Value = real number designating the width in raster units. .end literal .tp 18 .hl 2 ~HLABEL HLABEL can be used to print a label string on the screen starting at the current position. The format for the HLABEL command is .lit Command file format: .end literal .fl bold .ebo ^*HLABEL Lstring\* .dbo .lit where Lstring = Literal ASCII text string of up to 66 characters An example of using HLABEL would be to position the cursor to (200,200) and write the label "I AM A TITLE". To do this the following commands would be used. MOVABS 200,200 HLABEL I AM A TITLE .end literaL .tp 18 .hl 3 ~VLABEL VLABEL can be used to print a label string on the screen starting at the current position. While the HLABEL string is printed out horizontally, the VLABEL string is printed out vertically from top to bottom. The format for the VLABEL command is .lit Command file format: .end literal .fl bold .ebo ^*VLABEL Lstring\* .dbo .lit where Lstring = Literal ASCII text string of up to 66 characters An example of using VLABEL would be to position the cursor to (50,500) and write the label "VERTICAL LABEL". To do this the following commands would be used. MOVABS 50,500 VLABEL VERTICAL_TITLE .end literal .tp 20 .hl 3 ~NOTATE Notate will position the cursor to point IX,IY and place and alphanumeric label there. The label may be up to 54 characters long. In any event, a label of 54 characters is always plotted (although it may be blank/null filled). The command form is .lit Command file format: .end literal .fl bold .ebo ^*NOTATE Ix,Iy,Lstring\* .dbo .lit where Ix = Screen X location to start writing Iy = Screen Y location to start writing Lstring = Literal ASCII text string of up to 66 characters **NOTE** I have not had much success with this routine and have used the following calls instead: MOVABS Ix,Iy Move to screen coord. Ix,Iy HLABEL Text Write text .end lit .tp 21 .hl 2 ~LINE Specifies the line type to use in drawing a curve. The format of the command is .lit Command file format: .end literal .fl bold .ebo ^*LINE Iline__Type\* .dbo .lit where Iline_Type = 11+ Software Dash 9 Alternate moves/draws between points 4 Dot,dot,dot... 3 Dot,dash,dot,dash.... 2 Dash,dash,...... 1 Long dash,long dash.... 0 Solid -1 No line -2 Vertical Bar -3 Horizontal Bar -4 Point plot -11 User Line .end literal .tp 21 .hl 3 SYMBOL ~SYMBL is used to select the symbol type for plotting line graphs or symbol type for plotting bar charts. The command format is; .lit Command file format: .end literal .fl bold .ebo ^*SYMBL Isymb\* .dbo .lit where Isymb = 1 Circle 2 Cross 3 Triangle 4 Square 5 Star 6 Diamond 7 Vertical Bar 8 Plus sign 9 Up Arrow 10 Down Arrow 11 Reverse Triangle .end literal .tp 14 .hl 3 ~SIZES The command sizes sets the size of the data point symbol if a symbol has been specified with command SYMBL. .lit Command file format: .end literal .fl bold .ebo ^*SIZES Rsize\* .dbo .lit where Rsize = the multiplicative factor specifying the size of the data point symbols, or the distance in raster units between the bar chart and shading lines. .end literal .tp 17 .hl 3 STEPL ~STEPL is used to set the increment between data points which will be connected with a line. .lit Command file format: .end literal .fl bold .ebo ^*STEPL Ivalue\* .dbo .lit where Ivalue = 1 Desiginates lines between every data point 2 Desiginates lines between every other point 3 Desiginates lines between every 3rd point ... N Desiginates lines between every Nth point .end literal .tp 14 .hl 3 STEPS ~STEPS determines the interval between data symbols plotted. .lit Command file format: .end literal .fl bold .ebo ^*STEPS Ivalue\* .dbo .lit where Ivalue = 1 Desiginates symbols on every data point 2 Desiginates symbols on every other point 3 Desiginates symbols on every 3rd point ... N Desiginates symbols on every Nth point .end literal .tp 16 .HL 2 XFRM _and YFRM ~XFRM and ~YFRM sets the format for the major tic marks. The command format is .lit Command file format: .end literal .fl bold .ebo ^* .lit XFRM Iform YFRM Iform .end literal .dbo .lit where Iform = 1 No tic marks drawn = 2 Tic on outside of axis = 3 Tic on inside of axis = 4 Tic inside/outside of axis = 5 Arrow from outside to inside = 6 Arrow on inside of axis .end literal .tp 15 .hl 3 XLEN _and YLEN ~XLEN and ~YLEN are used to set the size of the major x-axis and y-axis tic marks. The format is; .lit Command file format: .end literal .fl bold .ebo ^* .lit XLEN Ilength YLEN Ilength .end literal .dbo .lit where Ilength = designates the distance in screen units that the tic marks will extend outward from the axis not including grid lines. .end literal .tp 19 .hl 3 XLAB _and YLAB ~XLAB and ~YLAB are used to set the label format on the x-axis and y-axis. .lit Command file format: .end literal .fl bold .ebo ^* .lit XLAB Iform YLAB Iform .end literal .dbo .lit where Iform = 0 No label = 1 Matches transformation type = 2 Logarithemic = 3 Days = 4 Weeks = 5 Periods = 6 Months = 7 Quarters = 8 Years .end literal .hl 2 XLOC _and YLOC ~XLOC and ~YLOC are used to set the location of the X and Y axis complete with labels and tic marks in relation to the left and lower edges of the screen window. The value to offset the axes, ILOC, may be positive or negative. If positive, the axis is moved inward from the window. If negative, it is moved outward. The command format is; .lit Command file format: .end literal .fl bold .ebo ^* .lit XLOC Iloc YLOC Iloc .end literal .dbo .lit where Iloc = the integer number of raster units the axes will be offset from the lower edge of the data window. .end literal .tp 18 .hl 3 XTYPE _and YTYPE ~XTYPE and ~YTYPE is used to define to the Advanced Graphic system the type of data that is represented in the X or Y array. .lit Command file format: .end literal .fl bold .ebo ^* .lit XTYPE Itype YTYPE Itype .end literal .dbo .lit where Itype = 1 Linear (Default) 2 Logarithmic 3 Days 4 Weeks 5 Periods 6 Months 7 Quarters 8 Years .end literal .pg .fl underline .eun .hl 1 ^& __TCS__Command__File__Options__ \& .dul .hl 3 ERASE ~ERASE erases the screen of the graphics output device. The amount of delay following the erase varies with the type of terminal being used. .lit Command file format: .end literal .fl bold .ebo ^*ERASE\* .dbo .hl 3 HDCOPY ~HDCOPY will make a copy of a 4014 screen on the graphics hardcopy device. At this time, HDCOPY does not work with VT125/VT240 terminals. However, those terminals can use the 8V-Mux. .lit Command file format: .end literal .fl bold .ebo ^*HDCOPY\* .dbo .tp 11 .hl 2 DRAWA ~DRAWA is used to draw a line (in user's units) from the current position to the specified coordinates. .lit Command file format: .end literal .fl bold .ebo ^*DRAWA Rxval,Ryval\* .dbo .lit where Rxval = Xvalue line is drawn to (users coordinates) Ryval = Yvalue line is drawn to (users coordinates) .end literal .tp 12 .hl 3 DRAWR ~DRAWR is used to draw a line from current position a displacement (in users coordinates). .lit Command file format: .end literal .fl bold .ebo ^*DRAWR Rxval,Ryval\* .dbo .lit where Rxval = Xvalue length of line (users coordinates) Ryval = Yvalue length of line (users coordinates) .end literal .tp 12 .hl 3 DRWABS ~DRWABS is used to draw a line between the current position on the screen to the location (in screen units) specified by the command. .lit Command file format: .end literal .fl bold .ebo ^*DRWABS Ixval,Iyval\* .dbo .lit where Ixval = Xvalue line is drawn to (screen coordinates) Iyval = Yvalue line is drawn to (screen coordinates) .end literal .tp 11 .hl 3 DRWREL ~DRWREL is used to draw a line a displacement (in screen units) from the current position on the screen. .lit Command file format: .end literal .fl bold .ebo ^*DRWABS Ixval,Iyval\* .dbo .lit where Ixval = Xvalue line is drawn to (screen coordinates) Iyval = Yvalue line is drawn to (screen coordinates) .end literal .tp 13 .hl 2 MOVEA ~MOVEA is used to move (in user's units) from the current position to the specified coordinates. The coordinates used will be appropriately converted to screen units depending on the scalling factors set. .lit Command file format: .end literal .fl bold .ebo ^*MOVEA Rxval,Ryval\* .dbo .lit where Rxval = Xvalue to move to (users coordinates) Ryval = Yvalue to move to (users coordinates) .end literal .tp 12 .hl 3 MOVER ~MOVER is used to move from current position a displacement (in users coordinates). .lit Command file format: .end literal .fl bold .ebo ^*MOVER Rxval,Ryval\* .dbo .lit where Rxval = Xvalue length to move (users coordinates) Ryval = Yvalue length to move (users coordinates) .end literal .tp 12 .hl 3 MOVABS ~MOVABS is used to move the current position on the screen to the location (in screen units) specified by the command. .lit Command file format: .end literal .fl bold .ebo ^*MOVABS Ixval,Iyval\* .dbo .lit where Ixval = Xvalue to move to (screen coordinates) Iyval = Yvalue to move to (screen coordinates) .end literal .tp 11 .hl 3 MOVREL ~MOVREL is used to move a displacement (in screen units) from the current position on the screen. .lit Command file format: .end literal .fl bold .ebo ^*MOVABS Ixval,Iyval\* .dbo .lit where Ixval = Xvalue length to move (screen coordinates) Iyval = Yvalue length to move (screen coordinates) .end literal .tp 14 .hl 2 SCURSR ~SCURSOR will display the cursor Inum times. Each time RETURN is hit it will write the cursor coordinates (in Screen units) to the open output file. If an "S" followed by a RETURN is typed, it will stop displaying the cursor prior to entering all Inum times. For the filing to work, the data file must be opened with a DATAO command. .lit Command file format: .end literal .fl bold .ebo ^*SCURSR Inum\* .dbo .lit where Inum = Number of points desired .end literal .tp 16 .hl 3 VCURSR ~VCURSOR will display the cursor Inum times. Each time RETURN is hit it will write the cursor coordinates (in Screen units) to the open output file. If an "S" followed by a RETURN is typed, it will stop displaying the cursor prior to entering all Inum times. For the filing to work, the data file must be opened with a DATAO command. .lit Command file format: .end literal .fl bold .ebo ^*VCURSR Inum\* .dbo .lit where Inum = Number of points desired .end literal .pg .fl underline .eun .hl 1 ^& __Internal__TEKGRAPH__Command__File__Options__ \& .dul .hl 3 ~BOX The BOX command places the terminal in graphic input mode. The cursor is then positioned and return struck to select the first corner of a "BOX". The cursor is then positioned and return struck to select the opposite corner of the "BOX". A frame is drawn around the box described by thes two corners and the X,Y internal limits are set to correspond to the box's coordinates. .lit Command file format: .end literal .fl bold .ebo ^*BOX\* .dbo .tp 11 .hl 3 CLOSE ~CLOSE is used to close open DATAI and DATAO files so that a new file can be used. .lit Command file format: .end literal .fl bold .ebo ^*CLOSE\* .dbo .tp 12 .hl 2 DATAI ~DATAI is used to specify an input data file specification. .lit Command file format: .end literal .fl bold .ebo ^*DATAI file__name\* .dbo .lit where file_name = an ASCII text string .end literal .tp 12 .hl 3 DATAO ~DATAO is used to open an output datat file for filing selected data. .lit Command file format: .end literal .fl bold .ebo ^*DATAO file__name\* .dbo .lit where file_name = an ASCII text string .end literal .tp 21 .hl 2 ~ERRBAR The ERRBAR command is used to plot data with error bars. If the SYMBL command is used to set the symbol type, the ERRBAR command must follow it if error bars are to be drawn. The ERRBAR command assumes that the data to be ploted has a fixed fractional uncertainty for both X and Y data. This uncertainty is specified with the ERRBAR command; .lit Command file format: .end literal .fl bold .ebo ^*ERRBAR Xerror,Yerror\* .dbo .lit where Xerror = Fractional uncertainty in X Yerror = Fractional uncertainty in Y .end literal If a symbol type is already set (SYMBL command) the error bars will be plotted on top of the symbols. If the SYMBL command is used after the ERRBAR command it will cancel the command to plot the error bar symbol. .tp 13 .hl 2 PRINT ~PRINT will cause the cursor to be displayed. After positioning the cursor, hit return or space bar and the coordinates of the cursor (in user coordinates) will be displayed. Type 'S' to stop. .lit Command file format: .end literal .fl bold .ebo ^*PRINT\* .dbo .lit The format for the data values printed is: (1PE11.4,1PE11.4) or (1.2345E67 ,1.2345E67) .end literal .tp 16 .hl 3 PRTABS ~PRTABS will cause the cursor to be displayed. After positioning the cursor, hit return or space bar and the coordinates for the cursor (in screen coordinates) will be displayed. Type 'S' to stop. .lit Command file format: .end literal .fl bold .ebo ^*PRTABS\* .dbo .lit The format for the data values printed is: [I4,I4] or [1234,1234] .end literal .tp 10 .hl 2 TITLE ~TITLE is used to print the title of the data file (as defined in the first record in the data file) on the top of the graph at screen coord. [145,740] (64 characters max). .lit Command file format: .end literal .fl bold .ebo ^*TITLE\* .dbo .tp 9 .hl 3 TITABS ~TITABS is used to print the title of data file (as defined in the first record in the data file) at current location on graph. (64 characters max). .lit Command file format: .end literal .fl bold .ebo ^*TITABS\* .dbo .tp 16 .hl 2 XLIMIT _and YLIMIT ~XLIMIT and ~YLIMIT are used to write the cursor defined limits to the output file. When XLIMIT/YLIMIT command is encountered, the cursor is displayed and when return is hit, either the x or y value becomes the limit value for filing. If the command is XLIMIT, a line is drawn between the coordinates (Xlim,Ymin) and (Llim,Ymax) and these points are written out to the data file (must be opened with DATAO). Likewise, if the command is YLIMIT, a line is drawn between (Xmin,Ylim) and (Xmax,Ylim) and the points written out to the data file. .lit Command file format: .end literal .fl bold .ebo ^* .lit XLIMIT YLIMIT .end literal .dbo .tp 12 .hl 2 WAIT and NOWAIT The ~WAIT and ~NOWAIT commands determine whether TEKGRAPH will wait or not for the user to press RETURN before exiting. By default, TEKGRAPH waits for the user to press RETURN if it is a ReGIS terminal and does not wait if it is not a ReGIS terminal (ie a Tektronix 4014). .lit Command file format: .end literal .fl bold .ebo ^* .lit WAIT NOWAIT .end literal \* .dbo .pg .hl 1 TEKGRAPH Control File Example .x Graph Control File ~Example The following is an example of a complicated control file. It is used to plot three seperate data files on the screen. The commands are commented (ie any text following the "!"). However, please note that a normal TEKGRAPH control file does not allow or accept in line comments. .lit ! Screen erases BINITT ! Init common blocks DATAI DRA1:[MARKB.TAB]NEAR.TMP;1 ! Input data file SLIMX 75,450 ! Set X plot window SLIMY 100,400 ! Set Y plot window XLEN 20 ! Set X tic length YLEN 15 ! Set Y tic length XFRM 2 ! Tics outside axis YFRM 2 ! Tics outside axis LINE 0 ! Use Solid line CHECK ! Check/scale data DSPLAY ! Draw graph MOVABS 0,350 ! Move to (0,350) VLABEL MDS UNITS -CM- ! Insert a vertical label MOVABS 180,50 ! Move to (180,50) HLABEL CENTIMETERS [SCAN] ! Horizontal label FRAME ! Frame the graph BINITT ! Re-initialize common DATAI DRA1:[MARKB.TAB]OFFSET.TMP ! Input a new data file SLIMX 575,975 ! Set new graphics window SLIMY 100,400 ! above the first graph XLEN 10 ! Set tic mark lengths YLEN 10 ! XFRM 2 ! and location YFRM 2 ! CHECK ! Check/scale DSPLAY ! Plot data MOVABS 500,325 ! Move to proper place VLABEL LINEARIZED ! and add vertical/horiz MOVABS 690,50 ! labels as necessary HLABEL CENTIMETERS [SCAN] ! FRAME ! draw a frame DATAI DRA1:[MARKB.TAB]AVEO.TMP ! Input another data file? CHECK ! Check/scale CPLOT ! Plot on same axis DATAI DRA1:[MARKB.TAB]AVE1.TMP ! Input yet onother LINE 1 ! Long dash line CHECK ! Check/scale CPLOT ! Plot on same axis DATAI DRA1:[MARKB.TAB]PLTINT.TMP ! Input yet another file LINE 2 ! Draw with dashed line CHECK ! Check/scale data CPLOT ! Plot on same axis BINITT ! Re-init tcs common block DATAI DRA1:[MARKB.TAB]INTGRL.TMP ! Input another file SLIMX 575,975 ! set data limits SLIMY 475,775 ! XLEN 10 ! Tic mark length YLEN 10 ! XFRM 2 ! and position YFRM 2 ! LINE 0 ! Solid line CHECK ! Check/scale DSPLAY ! display graph MOVABS 500,740 ! Move to label area VLABEL RELATIVE ENERGY ! write label MOVABS 690,425 ! move to new place HLABEL CENTIMETERS [SCAN] ! write horiz label FRAME ! Frame the graph. .end literal .hl 1 Brief List of Command File Options .literal BINITT AG-2 INITIALIZATION BOX FILE 2 COORDINATE SETS AND ENCLOSE FRAME CHECK SET TABLES WRT PRESENT DATA CLOSE CLOSE DATAI AND DATAO FILES CPLOT CURVE PLOTTING DATAI L1 INPUT DATA FILE SPEC DATAO L1 OUTPUT DATA FILE SPEC. DINITX MULTIPLE CURVES WITH DIFFERRENT SCALES(X) DLIMX R1,R2 SET DATA MIN AND MAX(X) DLIMY R1,R2 SET DATA MINA AND MAX(Y) DRAWA R1,R2 DRAW LINE (USERS UNITS) DRAWR R1,R2 DRAW LINE A DISPLACEMENT (USER UNITS) DRWABS I1,I2 DRAW LINE (SCREEN UNITS) DRWREL I1,I2 DRAW LINE A DISPLACEMENT (SCREEN UNITS) DSPLAY DISPLAY GRAPH ERASE ERASE SCREEN ERRBAR dX,dY Create a basic error bar scatter plot FRAME DRAW FRAME AROUND WINDOW HBARST I1,I2,I3 HORIZIONTA BAR CHART SPEC. HDCOPY HARD COPY SCREEN HLABEL L1 HORIZONTAL LABELING LINE I1 SET LINE TYPE MOVABS I1,I2 MOVE SCREEN CURSOR (SCREEN UNITS) MOVEA R1,R2 MOVE SCREEN CURSOR (USER UNITS) MOVER R1,R2 MOVE SCREEN CURSOR DISPLACEMENT (USER UNITS) MOVREL I1,I2 MOVE SCREEN CURSOR DISPLACEMENT (SCREEN) NOTATE I1,I2,L1 HORIZONTAL LABELING NOWAIT Don't wait till is hit before exiting PLACE LIT SET SCREEN MIN AND MAX TO PREDEFINED VALUES PRINT DISPLAY CURSOR DATA VALS (USER COORDINATES) PRTABS DISPLAY CURSOR DATA VAL (SCREEN COORDINATES) SCURSR I1 FILE CURSOR COORDINATES (SCREEN UNITS) SIZEL R1 SET BAR CHART LINE WIDTH SIZES R1 SYMBOL SIZE SLIMX I1,I2 SET SCREEN LIMITS(X) SLIMY I1,I2 SET SCREEN LIMITS(Y) STEPL I1 SET INCREMENT BETWEEN PLOTTED POINTS STEPS I1 SET INCREMENT BETWEEN SYMBOLS SYMBL I1 DESIGNATE PLOTTED SYMBOL TITABS Display DATA TITLE at current loc. (64 Max) TITLE Display DATA TITLE @ [145,740] (Scrn coor.) TSEND DUMP GRAPHICS BUFFER VBARST I1,I2,I3 VERTICAL BAR CHART PARAMETERS VCURSR I1 FILE CURSOR COORDINATES (USER UNITS) VLABEL L1 VERTICAL LABELING WAIT Wait till is hit before exiting XFRM I1 MAJOR TICK MARK FORM(X) XLAB I1 MAJOR TICK MARK LABEL TYPES(X) XLEN I1 MAJOR TICK MARK SIZE(X) XLIMIT FILE CURSOR DEFINED LIMITS XLOC I1 AXIS LOCATION(X) XTYPE I1 DATA TRANSFORM TYPE YFRM I1 MAJOR TICK MARK FORM(Y) YLAB I1 MAJOR TICK MARK LABEL TYPES(Y) YLEN I1 MAJOR TICK MARK SIZE(Y) YLIMIT FILE CURSOR DEFINED LIMITS YLOC I1 AXIS LOCATION(Y) YTYPE I1 DATA TRANSFORM TYPE .end literal .nhd .comment .require 'tekgraph.rnx'