.chapter The Graphics Workstation Menu .IF NBI .RM70 .LM0 .NOJUSTIFY .ENDIF NBI .IFNOT NBI .RM72 .LM5 .ENDIF NBI .NO HEADER .HEADERS ON .STHL ,0 .AP .flags bold .enable bolding .hl 1 Accessing the Graphics Workstation Menu The Graphics Workstaton Menu is invoked in a number of ways. It can be directly accessed from any meny via the ^*GRF\*master command (automatically defined at login). It also can be accessed on VT100 terminals from the Research Assistant Menu, or on Tektronix 4014 terminals from the main menu. .hl 1 The Main Menu The Graphics Workstation main menu is the dispatcher for a variety of graphic applications. The menu will appear either on a VT100 compatible or Tektronix 4014 terminals. On a VT100 class terminal the following menu appears. .keep .nofill ^*VPW Graphics Workstation\* Graph file: ^*Not Set\* You may choose: ^*C\*onvert - Convert graphics data file formats ^*ED\*it - Create/Edit a graphics data file ^*F\*it - Least squares fit data ^*G\*raph - Graph a data file ^*V\*iewgraph - Create presentation viewgraphs ^*EX\*it - Exit menu and use VAX directly ^*\* - Return to the main menu ^*PF2\* / ^*PF4\* - HELP / New VPW Window .fill .nokeep At the top of the display, the current name of the initial graph data file being worked on is displayed. Initially the file name is ^*NOT SET\*. The file name is set when either graphics data is selected for editing or for graphing (via Datatrieve or TekGraph), and thereafter can be used as a default answer to file name prompts. The display on a Tektronix 4014 terminal is slightly different. On 4014 terminals the TAB option to use a graphics tablet appears and ^*PF2\* / ^*PF4\* option to request HELP or a new VPW window does not. However, the Tab option only works correctly with the terminal connected to the graphics tablet. On other 4014 terminals the program will start up but can not work. The output of TAB will be a data file, GRAPH.DAT, which then becomes the default graphics data file name displayed in the main menu. The first option is to ^*C\*onvert a graphics file between formats. Different utilities such as DECalc output data in a variety of ways which are generally not compatible with the KMS canonical X-Y data file format. This option provides access to utilities which have been developed to convert between formats and to transpose X and Y data values. The next option is to ^*ED\*it a graphics file. This option allows one to either create a new X-Y graphics data file, or modify an existing one. While many forms of graphics data files are possible, the editor only supports the X-Y graphics data format produced by the graphics data tablet program or by programs for use with our Tektronix Plot-10/Advanced Graphics software. The data file format is documented in the chapter on using TekGraph. The ^*ED\*it option automatically invokes either the X-Y Graph Data Editor for VT100 terminals or PLOTedit for Tektronix 4014 terminals. PLOTedit is a line mode editor suitable for 4014 or hardcopy terminals. The X-Y Graph Data Editor is another NoteBook function. It allows X-Y data files (in our canonical data format) to be created, edited, and displayed. It provides a spreadsheet like ability to move a window through an set of X-Y data, inserting, adding, modifying, or deleting data as required. Its use is documented in a later section of this chapter. The ^*F\*it option allows one to do simple curve fits to linear polynomials, and first order exponential and power series equations. The *Graph option provides users with access to three programs which can be used to display graphic data, DECgraph, TekGraph, and Datatrieve. The format of DECgraph data files is unique to DECgraph (ie not the cannonical X-Y format), but for completness (and eventual integration with Datatrieve and DECalc) access to DECgraph is provided from this menu. Access to TekGraph and DTR are also provided for plotting X-Y data. Details of the *Graph options will be discussed later. The PF2 key or HELP key uses VMS HELP to prompt the user for what help information is desired. The *Viewgraph option allows users to prepare presentation viewgraphs. The viewgraphs are produced on either 4014 terminals or VT240 terminals using TVG. Optionally, users on VT100 terminals may rapidly design prototype viewgraphs (for eventual use with TVG) using the TVG Maker procedure. The use of the *Viewgraph option (TVG and TVG Maker) is documented in a subsequent chapter on "Generating Presentation Viewgraphs". .hl 1 Using PLOTedit PLOTedit is invoked automatically, if the ^*ED\*it option is selected and the terminal is not a VT100 compatible terminal. It also may be invoked by the command $UTL#PLOTEDIT. When invoked the following appears .tp 7 .keep .nofill PLOTEDIT Version 2.0 110483 Type H for HELP PLOTedit> .nokeep .fill Entering a "H" at the PLOTedit> prompt, produces a listing of available commands. .tp 9 .nofill .keep Plot Commands: E - Edit a plot file. H - Print this text. R - Read a plot file. W - Write a plot file. EX - Stop the PLOT program. PLOTedit> .nokeep .fill The EXit command or Ctrl-Z can be used to exit from PLOTedit. .HL 2 The Edit Command The edit command allows the values in a graphics data file to be modified. PLOTedit requires that the data file exist prior to editing it. If needed, the Write command may be used to create the file. When the edit command is invoked, PLOTedit will prompt for a file name. After entering a valid file name, PLOTedit displays the first X-Y data pair in the file and prompts for a command with a ">". .keep .nofill PLOTedit> E Edit a plot file. Enter the plot file name: GRAPH.DAT Coordinate: 1 X coordinate: -0.21288, Y coordinate: 1.32273 > .nokeep .fill Entering a "H" at the ">" prompt displays a list of valid editing commands. .keep .nofill Edit commands: A - Append coordinates AFTER the displayed coordinates. C - Change the displayed coordinates. D - Delete the displayed coordinates. E - Exit the editor. (Save the changes) H - Print this text. I - Insert coordinates BEFORE the displayed coordinates. J - Jump over coordinates. Q - Quit the editor. (Do not save changes) RETURN - Go to the next coordinates. .nokeep .fill Every time the RETURN key is pressed, the next X-Y coordinate pair in the file will be displayed. Motion through the data file occures in only the forward direction. The EXit command will write the changes made back to the specified filename. The Q command will exit to the PLOTedit> prompt without making any changes. The Jump command repositions the pointer to a higher coordinate point in the file. Once at the appropriate coordinate point, the data may be modified (the Change command) or new data may be added after that point (the Append command) or inserted before (the Insert command) the existing data point. The Delete command removes the currently displayed coordinate pair from the data file. When the A, C, or I command is invoked, PLOTedit will issue a ">>" prompt and request an X-Y data pair which should be entered as two floating point numbers separated with a comma. If data is entered, when the EXit command is invoked, PLOTedit will overwrite the modified data onto the specified data file. A new version of the file is not created, so be careful. .HL 2 The Read Command When the Read command is selected, PLOTedit prompts for a file name. after entering the name, it displays the data in the file from first to last point and then prompts for a new command. .HL 2 The Write Command The Write command allows one to create a new plot file. When invoked PLOTedit first prompts for a file name. Next it prompts for the number of points, N, to be entered. Each data pair is entered as an X-Y data pair with the two numbers seperated with a comma. When the N points are entered, PLOTedit, will write out the data file and return with the PLOTedit> prompt. Entry of data points can be terminated before all N points are entered by entering a Ctrt-Z at the prompt. .HL 1 Using The X-Y Graph Data Editor When one selects the ^*ED\*it option on a VT100 compatible terminal, first the Graphics Workstation prompts for a graphics data file name. Graphics data files have an extension of ".DAT" by default. If a file type is explicitly entered at the prompt for a file name, that file name becomes the new file type for subsequent use. If one does not know the name of the file, entering a "?" will display a directory of all files with the current default file type. After entering the data file name, the X-Y Graph Data Editor menu appears. .tp 14 .KEEP .NOFILL ^*X-Y Graph Data Editor\* (Type Ctrl-Y to exit at any point) You may choose: ^*D\*isplay - Display data ^*ED\*edit - Edit data ^*U\*se - Use a different data file ^*E\*xit - Exit Choice: .fill .nokeep The X-Y data editor is based on the VAX NoteBook, so the menu format should be familiar. One is allowed to either display the data in the file, edit an existing file (or create one if none alread exists), or select a different data file name. From this menu the PF2 (or HELP) key will display help information, and the PF4 (or F20) key will bring in a fresh window (VPW command page) for the user to use to communicate with DCL. .HL 2 The Display Option If one chooses to display the data (^*D\*isplay), the contents of the current default file are displayed. First the title of the file (if any) is shown, followed by the number of data points in the file (the maximum allowed is 600). Following this, the point number, the x-value, and the y-value are displayed in columnar fashion within a window below the data file information. Pressing any key while the data is being displayed will cause terminate further output of the data to the terminal. When the data has finished being displayed, a message saying to "Press RETURN when ready" will appear. When RETURN is pressed, the Editor menu will appear. .hl 2 The Edit Option When the ^*ED\*it option is selected, the current title of the graph will be displayed (if any), and the cell pointer will be positioned at the start of the data. To position the cell pointer to some other place in the file, use the GOTO key on the keypad. Actual data entry occurs at the bottom of the screen (Enter#value:#) with the data being entered into the highlighted cell pointer when RETURN is pressed. The highlighted cell pointer can be positioned with the arrow keys to select the data one wants to modify. Each time RETURN is pressed (but no data entered) on an X-value cell, the cell pointer is positioned to the next available cell. This continues until the cell pointer is positioned over the last available (and empty) cell in the file. If RETURN is pressed here, the screen is erased and the user is given three choices; to update the data file (answer Y"), not to update the file (answer "N"), or continue (answer "C"). If one chooses to update the file, the new data is output to the existing file (with one higher version number) and the obsolete file is deleted if the update was successful. If one chooses not to update the file (enter anything but "C" OR "Y"), any changes made are lost. If one did not realy want to stop entering/modifying data, enter "C" for continue, and the screen will be repainted and the data entry cell will be repositioned at the first data pair. With the cell pointer positioned over a value one wants to change, one need only enter a new value and the value in the cell will be replaced. Each time data is entered, the cell pointer will automatically move to the next logical place for entering data. If the data being entered is an X-value, after data entry, the pointer will move to the associated Y-value. After a Y-value is entered, the pointer will move to the next available X-value. The keypad can operate in two modes, FUNCTION and NUMERIC. The definitions for the function keys PF1, PF2, PF3, and PF4 are identical for both FUNCTION and NUMERIC mode. However when the keypad is in NUMERIC mode, the other keypad keys are interpreted as standard data entry keys (ie, 0,1....9) rather than performing specific functions. When the edit mode starts up the keypad is initially in FUNCTION mode. The keypad layout may be displayed at any time for either mode by pressing the PF1 key (Display Keypad). The keypad for FUNCTION mode is shown in Figure 1. The PF2 key will display help information. The PF3 key is used to toggle between the FUNCTION and NUMERIC keypad modes. When pressed, a bell will sound when the keypad shifts into NUMERIC keypad mode. When the PF3 key changes the keypad back to FUNCTION mode (default mode), no bell sounds. On VT100 keyboards LEDs 1-4 all light when the keypad is in FUNCTION mode (the default) and turn off when in numeric mode. Depending on the mode the keypad is in, the PF1 key will display the corrrect keypad diagram for either the FUNCTION or NUMERIC mode. The Quit key (key 7 if in FUNCTION mode) will abort all editing changes and return to the Graph Data Editor menu. When this happens, the original copy of the graphic data file is left intact. The Done key, will terminate data entry and prompt you to see if you realy want to update the data file. If the answer is "Yes", a new data file with modified values is written out. If the answer is "No", the changes made will be lost. If the answer is "Continue", editing will resume at the first data element. Each X-Y data point is associated with a point number from 1 to 600. The Goto key allows the data entry cell pointer, to be positioned rapidly to any point in the data file (the arrow keys could also be used). When the Goto key is pressed, the editor prompts with Goto:. Entering a value larger than the last data value in the file, will position one at the bottom of the file. .lit ------------------------- ----------------------------- ! ^ ! ! ! ! ! ! PF1 ! PF2 ! PF3 ! PF4 ! ! ! ! V ! <-- ! --> ! !Disply! ! ! ! !Back ! Fwrd! Left!Right! !KeyPad! HELP !Toggle! VPW> ! ------------------------- ----------------------------- ! ! ! ! ! ! Quit ! ! ! Done ! ! ! ! ! ! ----------------------------- PF3 Toggles keypad in/out of ! ! ! ! ! keypad application mode. ! Goto ! Insrt!Delete! Title! ! ! ! ! ! ----------------------------- VT100 LED's 1-4 light when in ! ! ! ! ! keypad application mode. ! ! ! ! E ! ! ! ! ! N ! VT2xx Bell -> Move to numeric ---------------------! T ! mode. Quiet -> move to ! VPW ! ! E ! keypad application mode. ! Main ! ! R ! ! Menu ! ! ! ----------------------------- Figure 1. .end literal The Insert key allows one to insert a new X-Y data pair in front of the current cell pointer. If the current cell pointer is at X-Y pair N, pressing the Insert key will position that X-Y pair to point N+1, and prompt for you to enter a new X-Y data for pair N. Likewise, the Delete key will delete the X-Y data pair currently under the cell pointer. When the current X-Y pair is deleted, subsequent points are shifted so that pair N+1 now becomes pair N in the file. Each graph data file has as its first record an optional title line. Pressing the title line allows one to enter text for this title (or remove or modify an existing title). The title can serve as a useful reminder as to what data is in the file. .hl 2 The Use Option When the ^*U\*se Option is selected, the name of the current default data file which will be edited is displayed and the user is prompted to enter a new file name to work on. If the user types RETURN, the name of the default file is left unchanged. .hl 1 The Fit Option The ^*F\*it option allows one to do simple curve fits to equations of the form .lit B 1 n Y=A exp(Bx), Y=A x, and Y=A +A x +....+A x 0 1 n .end lit It will allow one to select the type of fit, the degree, n, of the polynomial to fit (if a linear fit is selected), display statistics as to the goodness of fit, allow one to graph the results for a selected number of interpolated points, and output the fitted curve to a data file (CURVEFIT.DAT). When invoked it checks to see if the default graph file has been already set from some previous workstation operation. If it has, it uses this data file as the default when it prompts .keep .nofill Input data file name ( -> ^*default__name\*): .fill .nokeep If no data file name has been defined, the prompt will be .lit Input data file name: .end lit A control-Z to any prompt will return you to the choice prompt of the Graphics Workstation. At the "data file name" prompt, the default file name type ^*.DAT\* is assumed and need not be entered. Once a name (and optionally type) is entered, this name becomes the new default file name for the graphics workstation. Once the data file name is entered, the routine prompts for the type of fit to use (Exponential, Linear Polynomial, or Power). The form of each equation to be fitted is displayed. If Linear Polynomial is used, the order of the polynomial to be fitted is prompted for. It may range from 1-10. The fit is then calculated, and the fitting coeficients and the goodness of fit parameters are displayed. Next the routine gets ready to plot the fitted curve against the calculated data. The routine prompts for the number of points to interpolate for the fitted curve and asks if the fitted curve data points should be output to CURVEFIT.DAT. The user may enter a number of points to interpolate ranging from a minimum corresponding the the number of points in the original data file up to a maximum of 600 X-Y pairs. The graph is then displayed and remains on the screen until the user presses RETURN and is returned to the Graphics Workstation menu. .TP 13 .Hl 1 The Graph Options When the ^*G\*raph Option is selected, a secondary menu appears. .keep .nofill ^*Select Graph Program\* You may choose: ^*DE\*Cgraph - Use DECgraph ^*DT\*R - Plot data via DTR32 ^*T\*ek__Graph - Use TEK_GRAPH to plot existing data Choice: .nokeep .fill .hl 2 DECgraph Option The ^*DE\*Cgraph option provides an interface into DECgraph. The interface is limited, at this time, to just invoking DECgraph. At a future time it is hoped to provide the ability to convert files between DECgraph and TEKgraph. DECgraph only works on ReGIS mode terminals. Because DECgraph has the habit of leaving terminals in wierd configurations, VPW resets the terminals characteristics after using DECgraph. .hl 2 The DTR Option Datatrieve is able to plot data on VT125/VT240 type terminals. While it is far slower to plot data using Datatrieve rather than using TEK__Graph, in some ways it is simpler in that the user has fewer options which must be supplied to produce a finished graph. Another possible reason to use the ^*DT\*R option, is that it is possible to use DTR to create an output file of X-Y data pairs (real X, real Y) which is not in the cannonical form expected by TEK__Graph. However, the Graphics Workstation checks each data file to see which format the file is in (cannonical TEK__Graph or simple X-Y) and sets Datatrieve to use the data correctly (Note, the X-Y Graphic Data Editor will not work on this form of data file). Initially, Graphics Workstation prompts for a data file name. If the name is not known, a "?" will produce a formatted list of available graphic data files. If a default file has been set by previous work, it will appear in bold and a RETURN will select it. Next the Graphics Workstation prompts for both an X and Y title for the graph. Once a title is set, it becomes the default for subsequent work. Next a list of available plot types is displayed. .keep .nofill Available Plot Types LINE Scattergraph with connecting line LR Least squares linear fit to data LOGX-LOGY LOG-LOG plot LOGX-Y LOGX vs Y plot X-LOGY X vs LOGY X-Y X-Y scattergraph Plot type: .nokeep .fill If either the LINE or LR option is selected, a message saying that a plot type (X-Y, or LOG) must also be selected. Once the plot type is selected, Datatrieve is invoked to read the data and plot it. A message will appear stating the number of records found and shortly thereafter the plot will appear. When you are finished looking at the plot, press RETURN and the Graphics Workstation will prompt for another file to plot. .hl 2 The TEK__Graph Option If TEK__Graph is selected, the user is prompted for a graph file name. If a current data file has been previously set as the default file it will be displayed in bold (on VT100 compatible terminals) and typing a RETURN is all that is needed unless it is desired to use a different data file. Detailed information on TEK__Graph is supplied in a subsequent chapter. Some care must be used in the naming conventions for data files. First off, to retain compatibility with the original GRAPH program (See the TEK__Graph chapter) the file name GRAPH.DAT is handled in a special way. Consequently, when Graphics Workstation prompts for a file name, if GRAPH.DAT is entered, TEK__Graph will also prompt for the file name (displaying the default name of GRAPH.DAT). If, however, only the name GRAPH is entered at the Graphics Workstation prompt, TEK__GRAPH will still default to using the name GRAPH.DAT, but it will not prompt for the file name to use. TEK__Graph uses (and creates) control files to produce complicate plots. The Graphics Workstation procedure assumes that each data file name (which has a default type of .DAT) may also have a control file of the same name but with a type of .CTL. It checks for the existance of a control file, and if it exists, asks if it is to be used to plot the data. If it is, the workstation procedure invokes TEK__GRAPH specifying the control file name and no further input is required until the graph has been completed. At that time, a RETURN will bring back the Graphics Workstation prompt for a file name to graph with TEK__Graph. If, however, a control file does not exist, TEK__Graph will prompt to ask if a control file should be created. In some cases, data files with a specified name do not exist but control files exist which specify (internally) the names of the data files to be used. In this event, if no data file exists with the specified name (entered at the Graphics Workstation prompt), but a control file of the form .CTL exits, the Graphics Workstation will ask if you want to plot the data using that control file. If the answer is yes, the data is plotted. If the answer is no, a message saying the specified data file does not exist is displayed and Graphics Workstation again prompts for a data file name. On returning to the main menu, after using TEK__graph, the default graph file name will be set. It becomes the default data file for further use of the Graphics editor, or graphic operations.