1;10}RPALACI003CK00GG1;11}RPALACI003CK03GG2;12}RELITE01;13}RTRMVRT0050K00GG1;14}RTRMVRT0050K00PG1;15}RCOURIR101VK00GG1;16}RELITE0L02SK00GG1;17}LSCRIPTL03CK00GG1;18}DSYMBOLL03CK00GG1;19}LGLNAS0L03CK00GG?20 J?52h11h7 I?27h)>[1`[271`[271` [271` [271` [271` [271` [271` [271` [271`[1145`GPLOT [271` [271`[1011`A Library of Tools [271` [271`[1087`for use with [271` [271`[823`the Graphical Kernel System (GKS) [271` [271` [271` [271` [271` [271` [271` [271` [271` [271` [271`[1063`T. G. Worlton [271`[880`Intense Pulsed Neutron Source [271`[893`Argonne National Laboratory [271` [271`[1191`and [271` [271`[1077`D. Mikkelson [271`[954`University of Wisconsin [271` [271` [271` [271` [271` [271` [271` [271` [271`[1050`January 4, 1991 [271`  [271`[271`[271`GPLOT Graphics Routines [2101`Page i [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[271`[1019`Table of Contents [271` [271`[271`1.  Introduction [711`..........................................................[2226`1 [271`2.  Plot Orientation [811`......................................................[2226`1 [271`3.  Device Nomination Routines [1061`............................................[2226`2 [271`4.  Basic Plot Routines [886`...................................................[2226`3 [271`5.  Modifying the Plot Layout [1036`.............................................[2226`5 [271`[391`5.1  Reducing the Plot Size [1111`..........................................[2226`5 [271`[391`5.2  Changing the Plot Origin [1161`........................................[2226`5 [271`[391`5.3  Creating Multiple Plots on a Page [1386`...............................[2226`5 [271`[391`5.4  Clipping the Plot [986`...............................................[2226`5 [271`[391`5.5  Framing the Plot/Subplot Areas [1311`..................................[2226`6 [271`[391`5.6  Data Transforms [936`.................................................[2226`6 [271`6.  Writing Text on the Plot [1011`..............................................[2226`7 [271`[391`6.1  Text Size and Orientation [1186`.......................................[2226`8 [271`[391`6.2  Text Fonts [811`......................................................[2226`8 [271`[391`6.3  Instruction Font [961`................................................[2201`10 [271`7.  Drawing Axes [711`..........................................................[2201`10 [271`[391`7.1  Linear Axes [836`.....................................................[2201`12 [271`[391`7.2  Logarithmic Axes [961`................................................[2201`12 [271`[391`7.3  Producing Grids and/or Tick Marks [1386`...............................[2201`12 [271`8.  Drawing Curves [761`........................................................[2201`13 [271`[391`8.1 Error Bars [811`......................................................[2201`13 [271`[391`8.2  Line Types [811`......................................................[2201`13 [271`[391`8.3  Colors [711`..........................................................[2201`14 [271`[391`8.4  Data Markers [861`....................................................[2201`14 [271`[391`8.5  Interpolation Routines [1111`..........................................[2201`15 [271`9.  Legends [586`...............................................................[2201`15 [271`10.  Vectors With and Without Arrowheads [1311`..................................[2201`16 [271`11.  Graphic Primitives [886`...................................................[2201`17 [271`12.  Bar Graphs [686`...........................................................[2201`18 [271`13.  Contouring Routines [911`..................................................[2201`18 [271`14.  3 Dimensional Plotting [986`...............................................[2201`20 [271`[391`14.1 Setting the "workbox" [1111`..........................................[2201`21 [271`[391`14.2 Setting the Viewing Parameters. [1336`.................................[2201`21 [271`[391`14.3 Establishing a "relative" coordinate system [1661`....................[2201`23 [271`[391`14.4 3D Output [811`......................................................[2201`24  [271`[271`GPLOT Graphics Routines [2076`Page ii [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`15. Graphics Input [786`.......................................................[2201`26 [271`[391`15.1 Reading the Cursor Position [1261`....................................[2201`26 [271`[391`15.2 Using the Cursor to Modify the Plot [1461`............................[2201`26 [271`Index [436`.....................................................................[2201`28 [271`Examples [511`..................................................................[2201`34  [271`[271`[271`GPLOT Graphics Routines [2071`Page 1 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271` [271` [271`1.  Introduction [271` [271`[391`GPLOT is a collection of routines written to support generation of plots of [271`scientific data with GKS graphics. They have been developed and tested using [271`DEC VAX-GKS 4.0/4.1 which is a level 2c product. Since DEC GKS extensions to [271`the GKS standard have been used, some special features may need to be modified [271`before GPLOT will function correctly with another GKS package. These routines [271`can be linked to your programs by including the following in your link statement: [271` [271`[391`. . . ,GPLOT/OPT. [271` [271`This logical name points to both the DEC VAX GKS library and GPLOT routines. [271`Standard GKS calls may be mixed with calls to GPLOT routines, but you should [271`be aware of attributes and transforms set by GPLOT. One of the primary [271`purposes of GPLOT was to make it easy to convert graphics written for CA- [271`DISSPLA 10.5, so many GPLOT routines originally had the same name and [271`functioned in the same way as DISSPLA 10.5. Since the original version of [271`GPLOT, it has been modified for compatibility with version 11.0 of CA-DISSPLA. [271`DISSPLA 11.0 uses character strings instead of byte strings for text, but uses the [271`same subroutine names as DISSPLA 10.5. The version of GPLOT compatible with [271`DISSPLA 11.0 is now the default. To link this version of GPLOT include [271`"GPLOT_DIR:GPLOT/OPT" at the end of your link statement.: [271` [271`[391`GPLOT provides routines that allow you to create axes and plot data easily. [271`It provides both linear and logarithmic axes and allows marking the data with a [271`variety of symbols and error bars. It also provides routines for placing a legend [271`which labels the curves on the plot. This will automatically show the correct [271`symbol, curve type, and color for each data curve. GPLOT can also do a number [271`of interpolations to fit experimental data. GPLOT has routines for drawing bar [271`graphs, contour plots, and 3D surface plots with hidden-line removal. There are [271`routines for drawing polygons, circles, ellipses, arcs of circles or ellipses, and for [271`drawing vectors with arrow heads. These may be filled or open. GPLOT does [271`not provide blanking of areas like DISSPLA does because GKS supports clipping [271`only at the plot boundary, but for some devices it is possible to erase an area by [271`filling the area with the background color. GPLOT also has some conventions [271`which differ from DISSPLA. For instance, the tic marks are by default to the [271`inside for GPLOT and to the outside for DISSPLA, and GPLOT draws axes at [271`the top and right hand side of the plot area.. [271` [271` [271`2.  Plot Orientation [271` [271`[391`For the laser printers supported by DEC VAX GKS the default orientation is [271`landscape. If you draw a plot intended to be in portrait orientation, your first [271`GPLOT call should be: [271` [271`[391`CALL ORIENT('PORTRAIT') [271` [271`Otherwise your 8.5" X 11" plot will appear scaled down to fit in the landscape [271`orientation. This call must be made before the device nomination call because the [271`page orientation is determined when the device is nominated.  [271`[271`GPLOT Graphics Routines [2071`Page 2 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[391`For screen devices such as the VAXstation or TK4014 terminal, the plot [271`orientation cannot be changed. The Tektronix 4014 output only device which is [271`used to produce plots on the DEC LN03-Plus also does not support changing to [271`portrait orientation. [271` [271` [271`3.  Device Nomination Routines [271` [271`[391`Before a plot can be generated, one or more workstation devices must be [271`nominated. In most cases, the first GPLOT call should be: [271` [271`[391`CALL GSTART [271` [271`The devices for a given site are defined in the routine GPLOT_SRC:GDINIT.DAT. [271`Information in this file allows plot files to be sent to a particular print queue [271`automatically. Plot files which are to be sent to a print queue automatically are [271`created in the SYS$SCRATCH directory and will be deleted after printing. If [271`GDINIT does not specify a print queue, the output file will be created in your [271`current directory and not printed. Some options in the menu, such as [271`Postscript-file or Tektronix-file are designed to create an output file [271`for later use. You can create your own customized menu by copying the file [271`GPLOT_SRC:GDINIT.DAT to SYS$LOGIN:. And then using the program [271`EDIT_GMENU to modify it as desired. To add new devices, you will need to [271`know the workstation type numbers which are given in the DEC GKS [271`documentation. For plotters to print automatically you will also need the queue [271`name and the name of any form needed to put the printer into the graphics mode. [271`The device name for a hardcopy device usually is the queue name, but can be any [271`name of your choosing. When running in batch mode you will need to include the [271`command: [271` [271`$ DEFINE PLOTTER device-name [271` [271`where "device-name" is the name you have specified in setting up your menu. [271` [271`Information about each device can be obtained during the GMENU display by [271`selecting the device and pressing the help key. The system manager uses a text [271`editor to store site-dependent help information in the file SYS$HELP:GPLOT.HLP [271`then uses the LIBRARY command to insert the new information in [271`SYS$HELP:GPLOT.HLB. [271` [271`For Batch jobs, it is recommended that you make the following the first call to [271`GPLOT: [271` [271`[391`CALL GSTART [271` [271`GSTART will look at the logical names SCREEN and PLOTTER to see which [271`device(s) to activate. If neither of these is defined to be a valid device, GSTART [271`will call GMENU to produce a menu of available graphics devices. If both [271`SCREEN and PLOTTER are defined as valid devices when GSTART is called, the [271`plot will be generated on both at the same time. To stop getting plots on a [271`particular device, deassign SCREEN and/or PLOTTER or define them to be [271`different devices. For instance if you have a program, GRAPH, which calls [271`GSTART you could use the following series of commands to preview a plot and  [271`[271`GPLOT Graphics Routines [2071`Page 3 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`then make a hard copy on the LW print queue (assuming this is a valid queue at [271`your site). [271` [271`[391`$ DEFINE SCREEN TK4014 [271`[391`$ RUN GRAPH [271`[391`$ DEASSIGN SCREEN [271`[391`$ DEFINE PLOTTER LW [271`[391`$ RUN GRAPH [271` [271`If you omitted the second and third commands, the two plots would be generated [271`simultaneously. [271`[391`We do not currently have a way of plotting CGM metafiles, but GKS [271`metafiles can be plotted using a postprocessing routine (use the command [271`POSTGKS to run the GKS postprocessor). [271` [271`[391`Although GMENU and GSTART are the recommended methods of nominating [271`a graphics device, it is possible to nominate many devices with a direct subroutine [271`call. Most of these are included to emulate CA-DISSPLA. The device nomination [271`routine calls currently supported are: [271`[271` [271`[391`Device Call[1201`Device [271` [271`[391`CALL GKSM[1201`Produce GKS Graphics Metafile. [271`[391`CALL COMPRS[1201`Same as GKSM [271`[391`CALL CGMCO[1201`Produce CGM Character metafile [271`[391`CALL CGMTO[1201`Produce CGM Clear Text metafile [271` [271`[391`CALL POSTSCRIPT[1201`Apple Laser Writer [271`[391`CALL PSCRPT(X0,Y0,XW,YW)[1201`Same as POSTSCRIPT (arguments ignored) [271`[391`CALL HP7550[1201`Hewlett Packard pen plotter [271`[391`CALL LA50[1201`Produce plot file for LA50. [271`[391`CALL LA75[1201`Produce plot file for LA75. [271`[391`CALL TK4014F[1201`Graphics file to be printed on TK4014 emulator [271`[391`CALL QMS[1201`Same as TK4014F [271`[391`CALL QMS2[1201`Same as TK4014F [271`[391`CALL TALRS3[1201`Same as TK4014F [271`[391`CALL LN03TK[1201`Same as TK4014F [271` [271`[391`CALL TK4014[1201`Graphics terminal with TK4014 emulation [271`[391`CALL VAXSTATION[1201`Produce plot on VAXstation window [271`[391`CALL REGIS(I1,I2)[1201`Plot on VT240 (I2=0) or VT241 (I2=1) [271`[391`[1201`(I1 is ignored) [271`[391`CALL VT330[1201`Plot on VT330. [271`[391`CALL VT340[1201`Plot on VT340. [271` [271`[391`CALL GMENU[1201`Choose device from screen menu [271`[391`CALL GSTART[1201`(See above) [271` [271` [271`4.  Basic Plot Routines [271` [271`[391`A basic plot can be generated using the following basic GPLOT calls: [271` [271`[271`[511`CALL GSTART  [271`[271`GPLOT Graphics Routines [2071`Page 4 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[511` [271`[511`CALL PAGE (PAGEX,PAGEY) [271`[511`(PAGEX and PAGEY are the dimensions of the page. If there is no [271`[511`call to PAGE, then PAGEX and PAGEY take the default values of 8.5 [271`[511`and 11.0. The page orientation will be landscape unless [271`[511`ORIENT('PORTRAIT') is called before GSTART) [271`[511` [271`[511`CALL AREA2D (XAXIS,YAXIS) [271`[511`(XAXIS and YAXIS are the lengths of the axes. AREA2D is one [271`[511`routine which must always be called) [271`[511` [271`[511`CALL XNAME (XNAME,LXNAME) [271`[511`(XNAME is the name of a text string containing the x-axis label. [271`[511`LXNAME is the length of that name. If XNAME ends in a dollar sign [271`[511`($), LXNAME can be specified as 100 and the dollar sign will be [271`[511`ignored. Text specified in single quotes will work in either GPLOT3 or [271`[511`GPLOT11. If you want to use character string variables in GPLOT3, [271`[511`specify it as %REF(XNAME).) [271`[511` [271`[511`CALL YNAME (YNAME,LYNAME) [271`[511` [271`[511`CALL GRAF (XORIG,XSTEP,XMAX,YORIG,YSTEP,YMAX) [271`[511`(XORIG is the x-data value at the origin of the x-axis. XSTEP is the [271`[511`change in x-data value per axis division, and XMAX is the x-data value [271`[511`at the end of the AXIS. If 'SCALE' is used for XSTEP and/or YSTEP, [271`[511`GPLOT will calculate appropriate values to use.) [271`[511` [271`[511`CALL CURVE (XARRAY,YARRAY,NPNTS,IMARK) [271`[511`(XARRAY and YARRAY are the arrays of x-data values and y-data [271`[511`values, NPNTS is the number of data points in the arrays, and IMARK [271`[511`is an indicator of the data marker frequency. If IMARK=0, no symbols [271`[511`will be plotted and if IMARK > 0 symbols will be plotted every [271`[511`IMARKth point. If IMARK < 0 symbols will be plotted, but no curve [271`[511`will be drawn.) [271`[511` [271`[511`CALL ENDPL (IPLOT) [271`[511`(ENDPL updates the plot and if the mode is interactive and the device [271`[511`is of type input/output, ENDPL pauses for the user to view the plot. [271`[511`When the user types a RETURN, it closes and deactivates the [271`[511`workstation and zeros some of the plot parameters, so that AREA2D [271`[511`and GRAF must be called again to set up another plot. If IPLOT is [271`[511`greater than zero, information about the plot routine will be written in [271`[511`the lower left corner of the plot. If Workstation Independent Segment [271`[511`Storage (WISS) is active and there is no hardcopy device active, the [271`[511`user will be asked if he wants a hardcopy of that plot frame.) [271`[511` [271`[511`CALL GSTOP [271` [271`[391`A simple plot created using the above routines is illustrated by Example 1 in [271`the Appendix. [271` [271`  [271`[271`GPLOT Graphics Routines [2071`Page 5 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`5.  Modifying the Plot Layout [271` [271`[391`The values of PAGEX and PAGEY set by the call to PAGE determine the [271`aspect ratio of the plot. The axes lengths set by the call to AREA2D together [271`with the page variables determine the sub plot area within the plot area. These [271`values are used to calculate the normalization viewport in Normalized Display [271`Coordinates (NDC) for the plot area and for the sub plot area. The workstation [271`window and viewport are then calculated for these same transforms using the [271`currently active workstation(s). When the data values at the axis extremes have [271`been set by calls to GRAF or XGRAXS and YGRAXS, the data transform is [271`calculated. [271` [271`5.1  Reducing the Plot Size [271` [271`[391`GPLOT will generate the largest plot that can be produced on the [271`workstation surface while maintaining the aspect ratio indicated by the two PAGE [271`parameters. If you want to generate a smaller plot, you can control the size and [271`position of the plot on the page by using a smaller subplot area and changing the [271`plot origin. [271` [271`5.2  Changing the Plot Origin [271` [271`[391`GPLOT will try to center the sub plot area within the plot area. For [271`special cases such as when you want to produce multiple plots on a page, you can [271`use one of the following calls to change the sub-plot origin: [271` [271`[391`CALL PHYSOR(XPHYS,YPHYS) [271`[391`(Where XPHYS and YPHYS are the coordinates of the origin of the sub-plot [271`area with respect to the corner of the page) [271` [271`[391`CALL OREL(XOREL,YOREL) [271`[391`(Where XOREL, YOREL is the offset of the sub-plot origin with respect to [271`the previous origin) [271` [271`5.3  Creating Multiple Plots on a Page [271` [271`[391`Calls to change the plot origin are particularly useful when you want to [271`create multiple subplots on a page. Each subplot except the last should be [271`terminated with the call: [271` [271`[391`CALL ENDGR(IPLOT) [271`[391` [271`[391`The call to ENDGR will terminate the current plot, but not eject a page so [271`you can produce multiple plots on the same page. See Examples 3, 7, and 14 in [271`the Appendix for ways of using this feature. Note in these examples that the call [271`to AREA2D or YGRAXS together with the call to PHYSOR or OREL determines [271`the portion of the page which will contain the plot. [271` [271`5.4  Clipping the Plot [271` [271` [391`Points lying outside the page window will always be clipped. To clip all [271`points lying outside the subplot area defined by AREA2D, include the statement [271` [271`[391`CALL GRACE(0.0)  [271`[271`GPLOT Graphics Routines [2071`Page 6 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271` [271`[391`The default clipping can be restored by calling GRACE with an argument [271`greater than 0.5. An alternative is to use the GKS routine GSCLIP to turn [271`clipping on and off. [271` [271`5.5  Framing the Plot/Subplot Areas [271` [271`[391`By default, GPLOT will draw a border around the plot area. To eliminate [271`this plot border, make the call: [271` [271`[391`CALL NOBRDR [271` [271`[391`GPLOT also normally draws a frame around the subplot area with tick [271`marks on both sides and on the top and bottom (unlike DISSPLA). The frame [271`around the subplot area will normally be at the default line width, but can be [271`made thicker with the following calls: [271` [271`[391`CALL FRAME [271` [271`[391`CALL THKFRM (THKNSS) [271` [271`where THKNSS is approximately the thickness in inches. In calculating this, [271`GPLOT assumes a nominal thickness of 0.01". An example of the use of these [271`routines is given in Example Plot 2 in the Appendix. A value of THKNSS=0.04 [271`means that the frame is approximately four times the normal thickness. If [271`THKNSS is greater than or equal to 1.0 it is taken as a factor to multiply the [271`nominal thickness, so THKNSS=4.0 would yield a frame four times the nominal [271`thickness. [271` [271`5.6  Data Transforms [271` [271`[391`GPLOT defines three GKS transforms. They transform from the page or [271`subplot area in inches or data units to the workstation viewport. The GKS [271`Workstation viewport is always set to be the same as the GKS normalization [271`window. The page transform attempts to produce the largest plot possible on the [271`display surface without changing the aspect ratio of the plot. The subplot area [271`within the page is defined by the x and y axes in the call to area2d. The origin [271`of the subplot area with respect to the page area (in inches) is referred to as the [271`physical origin. GPLOT provides routines to transform between data units and [271`position with respect to the subplot area. These routines are function routines [271`patterned after those in DISSPLA. To obtain the position of a coordinate point [271`(XVAL,YVAL) in inches relative to the origin, use the calls: [271` [271`[391`XINCH = XPOSN (XVAL,YVAL) [271` [271`[391`YINCH = YPOSN (XVAL,YVAL) [271` [271`To find the data value of a point at a given position on the plot, use the [271`transforms: [271` [271`[391`XVAL = XINVRS (XINCH,YINCH) [271` [271`[391`YVAL = YINVRS (XINCH,YINCH) [271`  [271`[271`GPLOT Graphics Routines [2071`Page 7 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`These routines are particularly useful when doing input from a graphics [271`workstation or when you need to label data points. [271` [271` [271`6.  Writing Text on the Plot [271` [271`[391`It is often desirable to write additional text on the plot. This can be done [271`with the GKS routine GTX or with one of the GPLOT routines. The GPLOT [271`routines for writing text are the following: [271` [271`[511`CALL CHRMSG (XPOS,YPOS,CSTRING) [271`[511` [271`[511`CALL MESSAG (STRING,LSTRING,XPOS,YPOS) [271`[511` [271`[511`CALL RLMESS (STRING,LSTRING,XDATA,YDATA) [271`[511` [271`[511`CALL HEADIN (STRING,LSTRING,HTMULT,NLINES) [271`[511` [271`[511`CALL REALNO (ANUM,IPLACE,XPOS,YPOS) [271`[511` [271`[511`CALL RLREAL (ANUM,IPLACE,XDATA,YDATA) [271`[511` [271`[511`CALL INTNO (INUM,XPOS,YPOS) [271`[511` [271`[511`CALL RLINT (INUM,XDATA,YDATA) [271`[511` [271`[391`CHRMSG is the basic GPLOT routine for text output and all the other [271`GPLOT text routines call CHRMSG. CHRMSG has the same arguments as the [271`GKS text output routine GTX, but CHRMSG includes the capability of switching [271`fonts within the text string or changing character size or position with embedded [271`instructions. This makes it easier to do subscripts, superscripts, special symbols, [271`etc. Example plot 5 in the Appendix shows how subscripts, superscripts and [271`Greek characters can be produced using these in-line switching capabilities. The [271`other routines are included to emulate DISSPLA. The DISSPLA 10.5 text routines [271`were based on an older FORTRAN standard which did not support character [271`strings. [271`[391`For GPLOT3, STRING is a BYTE string of length LSTRING, or a character [271`variable specified as %REF(STRING). For GPLOT11, STRING is a character [271`string variable. Both GPLOT11 and GPLOT3 will accept a string constant in [271`single quotes. If you are using routines with text strings and do not wish to [271`count the length, you can end the string with a dollar sign ($) and set [271`LSTRING=100. For GPLOT11 you can also specify LSTRING as 0. The [271`parameter CSTRING used in CHRMSG is a character string so no string length [271`needs to be passed if CHRMSG is used. [271`[391`In the above routines the text position XPOS and YPOS are in terms of axes [271`units (inches or centimeters), and XDATA and YDATA are in terms of data units. [271`[391`HEADIN is used to center lines of text above the subplot area, so no [271`positioning is needed, but you must pass the total number of heading lines to be [271`used in the variable NLINES. You can also expand the height of the heading [271`characters above the default by setting HTMULT > 1.0. The last four routines [271`are used for writing real numbers and integers on the plot. IPLACE is used to [271`indicate the number of decimal places to use in writing real numbers on the plot. [271`If IPLACE is negative, the number is written in exponent form. [271`  [271`[271`GPLOT Graphics Routines [2071`Page 8 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[391`It is sometimes useful to know the length of a text string written on a plot [271`for text positioning, etc. The function calls XMESS, XINT, and XREAL can be [271`used to get the length of a text string output by MESSAG, INTNO, RLINT, [271`REALNO, or RLREAL with the current font and character height. They are [271`called as follows: [271` [271`[391`XLENGTH = XMESS(LMESS,IMESS) [271` [271`[391`XLENGTH = XINT(INUM) [271` [271`[391`XLENGTH = XREAL(ANUM,IPLACE) [271` [271`6.1  Text Size and Orientation [271` [271`[391`The Height and angle of the text may be altered by calling the routines: [271` [271`[511`CALL HEIGHT (HITE) [271`[511` [271`[511`CALL ANGLE (ANG) [271`[511` [271`These routines affect the height and angle of all text written to the screen after [271`they are called. Example plot 2 in the Appendix shows the effect of a call to [271`ANGLE and Example plot 5 shows the use of HEIGHT.1 If calls to the GKS [271`routines GSCHH (HITE) and/or GSCHUP (XVEC,YVEC) are mixed with these calls, [271`they may produce unpredictable results unless you are sure what world coordinate [271`transformation is being used at the time. [271` [271`6.2  Text Fonts [271` [271`[391`DISSPLA provides a large number of software fonts and some of the [271`DISSPLA font names have been included as valid calls in GPLOT for ease in [271`conversion of graphics programs, but there may be little similarity in the [271`appearance of the two fonts. The font names from DISSPLA which can be used [271`include: CARTOG, COMPLX, DUPLX, FASHON, FUTURA, SCMPLX, SERIF, [271`SIMPLX, SWISSB, SWISSL, SWISSM, TRIPLX, GOTHIC, GREEK, [271`MATHEMATICAL, RUSSIAN, SCRIPT, SPECIAL, and STANDARD. Some of [271`these select an alphabet instead of a font style and thus must be generated in [271`software. Others may have the desired effect on a Postscript printer, but have [271`no effect on other devices. [271`[391`The actual fonts available are both device and GKS implementation specific. [271`For complete control over the font style and precision, use the GKS call: [271` [271`[391`CALL GSTXFP (FONTID,PRECIS) [271` [271`where FONTID is an integer indicating the font to be selected, and PRECIS is an [271`integer indicating the precision required. For highest precision, specify PRECIS = [271`2 (stroke precision). For medium precision, specify PRECIS = 1 (character [271`precision), and for low precision, specify PRECIS = 0 (String precision). These [271` [271`------------------------------ [271` [271`1.[321`The current version of DEC GKS produces software characters which are two- [271`[321`thirds of the requested height. The Postscript driver produces characters [271`[321`of the correct height, so mixing hardware and software characters on a [271`[321`postscript printer produces characters of differing heights. [271` [271`[271`GPLOT Graphics Routines [2071`Page 9 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`precision constants are a part of the GKS standard, but the FONTID numbers are [271`device and implementation specific. [271`[391`DEC has used negative numbers for all their fonts except the default font, [271`FONTID = 1, to avoid conflict with future GKS standard font numbers. VAX [271`GKS provides a number of software fonts which are available on any device. To [271`draw text using software fonts requires that the processor calculate all the strokes [271`to be made to draw each character and sends these vectors to the device. [271`Hardware fonts are created by sending a font selection command to the device [271`and then sending the ASCII character codes to the device. Using software fonts [271`can increase the time taken to generate a plot by a factor of ten or more. For [271`speed and efficiency it is always preferable to use hardware fonts. Software fonts [271`will provide higher quality and placement precision unless you can design your [271`graph for the hardware fonts available on a specific plotter or you are using a [271`Postscript plotting device. [271`[391`Postscript plotters are able to generate a variety of fonts in any size and [271`orientation. Postscript is recommended when you want to have higher quality [271`plots, or any time you are going to need a lot of large or heavy text on the plot. [271`Postscript plots can also be printed on a typesetter at even higher quality. DEC [271`VAX-GKS supports a number of software fonts which are described in Appendix G [271`of the DEC GKS Reference Manual. As mentioned, Postscript fonts can be drawn [271`in any size and orientation. Since it is difficult to remember the font numbers, a [271`routine has been included in GPLOT to allow selecting the fonts by name and [271`attribute, using the call: [271` [271`[391`CALL FONT ('font_name','font_attribute'), [271` [271`where the font attributes are 'NORMAL', 'BOLD', 'SLANT' or 'ITALIC', and [271`'BOLD ITALIC'. The font names for the Apple Laserwriter Plus are shown in [271`Table 6.1 with the font name written in the indicated style. [271` [271` [271`[371`Font[949`Attribute[1381`Sample Text [271`Helvetica[976`Normal[1381`ABCDEFGabcdefg [271`Helvetica[1001`Bold[1381`ABCDEFGabcdefg [271`Times Roman[968`Normal[1381`ABCDEFGabcdefg [271`Times Roman[1007`Bold[1381`ABCDEFGabcdefg [271`Times Roman[964`Slant[1381`ABCDEFGabcdefg [271`Times Roman[853`Bold Italic[1381`ABCDEFGabcdefg [271`1;18}RLTTGTH002SK00GG18mPalatino[976`Normal[1381`ABCDEFGabcdefg [271`)>Bookan[976`Noral[1381`ABCDEFGabcdefg [271`)0[?27h[?11h[7 I[?52h [50 C ARGONNE NATIONAL LABORATORY[1520`Intra-Laboratory Memo )>(0(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B(0 (B 120dHelvetica Narrow[976`Normal[1381`ABCDEFGabcdefg [271`400d1;18}DMDRGTHL02SK00PG18mChancery[976`Normal[1381`ABCDEFGabcdefg [271`Symbol[968`NormalP;1;y\[1381`ABCDEFGabcdefg [271`Dingbats[968`Normal[1381`ABCDEFGabcdefg [271` [271`[783`Table 6.1 POSTSCRIPT Font Samples [271` [271` [271`It should be noted that the Laserwriter Plus has more fonts than the regular [271`Laserwriter, and other Postscript printers may have some differences in the fonts [271`available. [271`  [271`[271`GPLOT Graphics Routines [2046`Page 10 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`6.3  Instruction Font [271` [271`[391`The advantage of using the GPLOT text routines instead of the GKS routine [271`GTX for text output is that some capability for special formatting and font- [271`switching within the string have been included. The routine MXiALF [271`(LALPHA,LCHAR), where "i" can be 1-6, can be used to define up to six special [271`font-switching or instruction characters. In these routines LALPHA is a character [271`or byte string giving the name of the font or character set to be used and [271`LCHAR is a character which is used as a flag to activate the font change or [271`instruction interpretation. Two special variations of MXiALF (BASALF and [271`MIXALF) have been defined which use the left and right parenthesis as their font [271`switch flag characters, so they only require the parameter LALPHA. [271`[391`If LALPHA = 'INSTRUCTION' the text following the occurrence of the [271`corresponding flag character will be interpreted as instructions until another flag [271`character is found. The instructions which have been implemented are: [271` [271` [271`[391`Ex[453`..............Elevate text baseline a fraction "x" of the character height. [271` [271`[391`Lx[453`..............Lower text baseline a fraction "x" of the character height. [271` [271`[391`Bi[453`..............Backspace "i" characters. [271` [271`[391`Hx[470`.............Multiply character height by factor "x". [271` [271`[391`Ax[453`..............Move by a fraction of character height "x". [271` [271`The "x" above is either a real number or the letter "X". If the letter "X" is [271`used the corresponding value will reset the variable to the default value. These [271`instructions are interpreted by the subroutine ANLZIN which is called by [271`CHRMSG. All the GPLOT text routines go through CHRMSG so may use these [271`special features for font switching,etc. See Example Plot 5 in the Appendix to see [271`how these instructions are used. [271` [271` [271`7.  Drawing Axes [271` [271`[391`A number of GPLOT routines are available for drawing axes. There are two [271`routines for labelling the axes which are called as follows: [271` [271`[391`CALL XNAME (XNAME,LNAME) [271` [271`[391`CALL YNAME (XNAME,LNAME) [271` [271`where XNAME and YNAME are the labels for the axes and LNAME is the [271`number of characters in the name. If you don't want to count characters, you [271`can add a '$' at the end of BNAME and set LNAME = 100. If XNAME and [271`YNAME are specified as variables instead of text constants in single quotes, they [271`should be BYTE variables for GPLOT3 and CHARACTER variables for GPLOT11. [271`The axes which are generated will have labels and numbers on the bottom and [271`left axes, and will have axes with tic marks on the right and top. This differs [271`from the DISSPLA convention which places the tic marks on the outside by [271`default. Additional axes may be drawn by the calls [271`  [271`[271`GPLOT Graphics Routines [2046`Page 11 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[391`CALL XGRAXS [271`(XORIG,XSTEP,XMAX,XAXIS,XNAME,LXNAME,XPOS,YPOS) [271` [271`[391`CALL YGRAXS (YORIG,YSTEP,YMAX,YAXIS,YNAME,LYNAME,XPOS,YPOS) [271` [271`The arguments have the same meanings here as described for GRAF, XNAME, and [271`YNAME, except that if LXNAME or LYNAME are negative the numbers and [271`labels will be drawn on the opposite side of the axes. Example Plot 7 shows [271`how YGRAXS can be used together with OREL or PHYSOR to produce multiple [271`subplots on a page. The values at the axis tic marks can be set to integers by [271`the calls [271` [271`[391`CALL XINTAX [271` [271`[391`CALL YINTAX [271` [271`[391`CALL INTAXS [271` [271`It should be noted that the values XSTEP and YSTEP can be replaced by the [271`string 'SCALE' to have the program calculate appropriate step sizes. If you want [271`the tic marks to go to the outside, you can reverse them with the following calls: [271` [271`[391`CALL XREVTK [271` [271`[391`CALL YREVTK [271` [271`The axes drawn will join at the XORIG and YORIG values, but the axes can be [271`made to cross at x = 0.0, y = 0.0 by calling CROSS. This is sometimes useful [271`when one or both axes start at negative values and go to positive. [271`[391`By default the axis labels will be horizontal on the x-axis and vertical on the [271`y-axis. The angle of these labels can be changed with the routines: [271` [271`[391`CALL XAXANG(ANG) [271` [271`[391`CALL YAXANG(ANG) [271` [271`where ANG is the angle from the horizontal in degrees. Example Plot 2 in the [271`Appendix shows how these routines can be used to modify the tic marks and axis [271`labels. [271` [271`Another option is to eliminate the labels at the beginning or the end of the axes, [271`or both. This can be done with the calls: [271` [271`[391`CALL XAXEND (option) [271` [271`[391`CALL YAXEND (option) [271` [271`where "option" is one of the following values: 'NOFIRST','NOLAST', or [271`'NOENDS'. [271`  [271`[271`GPLOT Graphics Routines [2046`Page 12 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`7.1  Linear Axes [271` [271`[391`The basic graph set up routine is GRAF as described previously. GRAF uses [271`data units to define the origin, step size and ending values for the axes. There [271`are two other routines for setting up linear axes which use inches instead of data [271`units for one of the axes. They are: [271` [271`[391`CALL XGRAF (XORIG,XSTP,XMAX,YORIG,YSTEP) [271` [271`[391`CALL YGRAF (XORIG,XSTEP,YORIG,YSTP,YMAX) [271` [271`where XSTEP and YSTEP are given in inches and the other arguments are the [271`same as for the GRAF routine. There is also a routine for setting up a plot with [271`axes labelled with a user specified text string instead of with numbers. These [271`routines are: [271` [271`[391`CALL XLABGR (LXARAY,IXWORD,IXTOT,YORIG,YSTP,YMAX) [271` [271`[391`CALL YLABGR (XORIG,XSTP,XMAX,LYARAY,IYWORD,IYTOT) [271` [271`7.2  Logarithmic Axes [271` [271`[391`Logarithmic axes can be used instead of linear axes by replacing the call to [271`GRAF with one of the following calls: [271` [271`[511`CALL XLOG (XORIG,XCYCLE,YORIG,YSTEP) [271`[511` [271`[511`CALL YLOG (XORIG,XSTEP,YORIG,YCYCLE) [271`[511` [271`[511`CALL LOGLOG (XORIG,XCYCLE,YORIG,YCYCLE) [271`[511` [271`[391`XLOG and YLOG give semilog plots and LOGLOG does loglog plots. In [271`these routines XCYCLE and YCYCLE are the cycle lengths in axis units, and the [271`other parameters are as in GRAF. Example plot 3 in the Appendix shows the [271`effect of the different logarithmic axes. [271` [271`7.3  Producing Grids and/or Tick Marks [271` [271`[391`Tick marks are normally generated at each major axis division. To produce [271`additional tick marks, make the following calls: [271` [271`[391`[511`CALL XTICKS(ITICKS) [271` [271`[391`[511`CALL YTICKS(ITICKS) [271` [271`where ITICKS is the total number of tick marks per axis step. These routines are [271`demonstrated in Example Plot 2 in the Appendix. [271` [271`[391`To produce a grid on the plot, use one of the following subroutine calls: [271` [271`[511`CALL GRID (NXGRID,NYGRID) [271`[511` [271`[511`CALL DOTGRID (NXGRID,NYGRID) [271`[511`  [271`[271`GPLOT Graphics Routines [2046`Page 13 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[391`In these grid routines NXGRID and NYGRID are the numbers of grid lines [271`per division on the x and y axes. DOTGRID is a special grid which produces the [271`dots each one-fifth of an axis division. This is slow, but can be used for [271`interpolation. A dotted grid can also be produced by GRID if the line type is [271`changed to dotted before calling GRID, but the dots will not be synchronous with [271`the axis divisions. [271` [271` [271`8.  Drawing Curves [271` [271`[391`The basic routine for drawing curves in GPLOT is CURVE, as indicated in [271`the basic plot routines section. This routine will draw curves and/or place [271`markers at data points. [271` [271`8.1 Error Bars [271` [271`[391`It is often desirable to put error bars on the data points being plotted. [271`Three calls have been provided in GPLOT which will draw error bars for the x or [271`y uncertainty or both. Use one of the following calls in place of the call to [271`CURVE and supply the array(s) of error values to be used. The calls are: [271` [271`[391`[511`CALL EYCRV (XARRAY,YARRAY,NPTS,IMARK,EYARY) [271` [271`[391`[511`CALL EXCRV (XARRAY,YARRAY,NPTS,IMARK,EXARY) [271` [271`[391`[511`CALL EXYCRV (XARRAY,YARRAY,NPTS,IMARK,EXARY,EYARY) [271` [271`The default error bar will be a line, but this can be changed to a line with bars [271`on the end by the call: [271` [271`[391`[511`CALL EMARK (2) [271` [271`8.2  Line Types [271` [271`[391`GPLOT supports the following calls to set the line-type to be used in [271`generating curves: [271` [271`[511`CALL SOLID [271`[511` [271`[511`CALL DOT [271`[511` [271`[511`CALL DASH [271`[511` [271`[511`CALL CHNDOT [271`[511` [271`[511`CALL CHNDSH (DEC GKS extension not supported prior to DEC GKS [271`[511`4.0) [271`[511` [271`[391`The thickness of the lines drawn with the curve routines will be the default [271`value for the graphics device unless they have been thickened by a call to [271`THKCRV. The call is: [271` [271`[391`CALL THKCRV (THKNSS) [271`  [271`[271`GPLOT Graphics Routines [2046`Page 14 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`where if THKNSS )>>)0 1.0 it is a factor which multiplies the nominal line width. If [271`THKNSS < 1.0 it is approximately the line thickness in inches, although this is [271`somewhat device dependent. THKCRV does not affect the line thickness of lines [271`drawn by other routines. [271` [271`8.3  Colors [271` [271`[391`When plotting on a color device, it is possible to choose colors by name [271`using the call: [271` [271`[391`CALL NEWCLR ('color') [271` [271`Color names which are recognized include FOREGROUND, BACKGROUND, RED, [271`GREEN, BLUE, CYAN, MAGENTA, YELLOW, BLACK, and WHITE. It will [271`also recognize other colors such as BROWN, GREY, GRAY, PURPLE, AQUA, [271`and PINK for certain devices. The color set by a call to NEWCLR will affect [271`text, markers, and filled areas as well as lines. Since colors are device dependent [271`they will appear differently on different devices, and some trial and error will [271`probably be necessary. Example Plots 6, 8, and 10 demonstrate the use of color [271`if they are run on a color device. [271`[391`Some devices, such as Postscript printers and VAXstations, permit writing in [271`the background color as well as the foreground color, allowing you to erase an [271`area with the background color before writing over it in another color. [271` [391`For more control over colors, you can use the GKS call to set the color [271`representation (GSCR) together with the calls to set color index for the text, [271`polyline, polymarker, and fill area (GSTXCI, GSPLCI, GSPMCI, GSFACI). See the [271`GKS documentation for more details of these calls. You should be aware, [271`however that some GPLOT routines call these GKS color routines with a color [271`index stored in common. [271` [271`8.4  Data Markers [271` [271`[391`Thirty different data markers are supported by GPLOT for marking data [271`points, with most of the first 18 being the same as those produced by DISSPLA. [271`The exceptions are symbols 11, 14, and 17. Symbols 11 and 14 appear slightly [271`different because triangles are centered on the center of mass in GPLOT instead of [271`at the half height of the triangle as in DISSPLA. GPLOT uses a different symbol [271`for marker 17 because DISSPLA duplicates markers 17 and 0. [271`[391`The symbols automatically increment when multiple curves are drawn on the [271`same plot, but specific markers may be selected by the call [271` [271`[391`[481`CALL MARKER (n) [271` [271`The symbols are plotted at a default size unless a marker scaling factor is applied [271`by the call: [271` [271`[391`[481`CALL SCLPIC (PICFAC) [271` [271`where PICFAC is the marker height scale factor. In some cases different markers [271`will be different sizes because some are drawn by GPLOT subroutines and others [271`are furnished by DEC VAX GKS. Markers furnished by DEC VAX GKS will also [271`be different sizes on different devices because marker size scaling is in terms of [271`the default marker size for the device. If this causes a problem, you can select [271`the markers drawn by GPLOT subroutines. Markers 2,8,10-15, and 22-24 are  [271`[271`GPLOT Graphics Routines [2046`Page 15 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`generated by GPLOT. The other markers are generated by DEC VAX GKS and [271`the size will vary from device to device. There is also a bug in DEC VAX GKS [271`in marker clipping for some devices, so errors may result when you attempt to [271`draw one of those markers outside the clipping rectangle. [271`[391`The first 22 available markers are illustrated in Example 11 in the Appendix. [271` [271`8.5  Interpolation Routines [271` [271`[391`A number of routines have been included which allow interpolation before [271`drawing the curve through the data points. The default is to draw straight lines [271`connecting the points supplied to the curve routine. If the call to the curve [271`routine is preceded by a call to an interpolation routine, a different curve will be [271`drawn for each of the other methods. The interpolation routines which can be [271`called include: [271` [271`[391`CALL LINEAR [271` [271`[391`CALL BARS(BARWTH) [271` [271`[391`CALL PARA3 [271` [271`[391`CALL PARA5 [271` [271`[391`CALL POLY3 [271` [271`[391`CALL POLY5 [271` [271`[391`CALL PSPLIN [271` [271`[391`CALL RASPLN(TENSN) [271` [271`[391`CALL SPLINE [271` [271`[391`CALL STEP [271` [271`Here BARWTH is the ratio of the bar width to data interval, and TENSN is a [271`parameter that determines the degree of smoothing by the RASPLN routine. A [271`sample of the effects of some of these interpolation routines is shown in Example [271`7 in the Appendix. [271` [271` [271`9.  Legends [271` [271`[391`Graphs may be labelled with legend routines similar to those used by [271`DISSPLA except that the GPLOT routines keep track of line color and type as [271`well as symbol type for use in the legend. A legend may be produced as [271`follows:2 [271` [271`[481`PARAMETER NWORDS=100 [271`[481`INTEGER IPKRAY [271`[481`[631`. [271`[481`[631`. [271` [271`------------------------------ [271` [271`2.[321`Note that this example is not applicable to the old version (GPLOT3). [271` [271`[271`GPLOT Graphics Routines [2046`Page 16 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[481`[631`. [271`[481` [271`[481`CALL MYLEGN ('Legend Heading$',100) [271`[481`[631`. [271`[481`[631`. [271`[481`[631`. [271`[481`CALL LINES ('Curve 1 Label$',IPKRAY,1) [271`[481`[631`. [271`[481`[631`. [271`[481`[631`. [271`[481`CALL LINES ('Curve 2 Label$',IPKRAY,2) [271`[481`[631`. [271`[481`[631`. [271`[481`[631`. [271`[481`CALL LEGEND (IPKRAY,NCURVE,XPOS,YPOS) [271`[481` [271`Here LMAX is the maximum number of characters in a legend line, NCURVE is [271`the total number of curves, and the last argument in the call to LINES is [271`ICURVE, the curve index. You may want to position the legend where it will [271`not interfere with other curves and text because GPLOT does not always blank [271`the plot as DISSPLA does and the graph can overwrite the legend. For devices [271`that can write in the background color the legend area will be cleared before the [271`legend is written. A complete example showing how to produce a legend on a [271`plot is included in Example Plots 6 and 11 in the Appendix. [271` [271` [271`10.  Vectors With and Without Arrowheads [271` [271`[391`If you wish to draw vectors without using the CURVE calls, GPLOT [271`provides routines to draw vectors in either axes units or data units. They may [271`also include various types of arrow heads if desired. The calls for these routines [271`are: [271` [271`[391`[481`CALL VECTOR (XFROM,YFROM,XTO,YTO,IVEC) [271` [271`[391`[481`CALL RLVEC (XFROM,YFROM,XTO,YTO,IVEC) [271` [271` [271`IVEC is a four digit integer specifying the arrowhead to be used. The first digit [271`gives the ratio of width to length and may have values from 0 to 5. The second [271`digit gives the arrowhead size from 0 to 6. The third digit specifies the type of [271`arrowhead: [271` [271`[391`0 -> Solid [271`[391`1 -> White [271`[391`2 -> Open [271`[391`3 -> Closed [271` [271`The last digit specifies the location of the arrowheads: [271` [271`[391`0 -> None [271`[391`1 -> at (XTO,YTO) [271`[391`2 -> at both ends [271`[391`3 -> at both ends, pointing out  [271`[271`GPLOT Graphics Routines [2046`Page 17 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[391`4 -> at both ends, pointing to (XTO,YTO) [271` [271`[391`Vectors can also be drawn using the following routines to define a starting [271`point and subsequent points to be connected. [271` [271`[391`CALL STRTPT(X0,Y0) [271` [271`[391`CALL CONNPT(XI,YI) [271` [271`[391`Vectors will be drawn using the nominal line width for the graphics device [271`unless THKVEC has been called. To change the line width of lines drawn with [271`vector routines, use the call: [271` [271`[391`CALL THKVEC(THKNSS) [271` [271`where the line width used to draw the vector will be THKNSS times the nominal [271`linewidth if THKNSS )>>)0 1.0 or will be approximately THKNSS inches thick if [271`THKNSS < 1.0. [271` [271` [271`11.  Graphic Primitives [271` [271`[391`DEC VAX-GKS provides graphic primitives for drawing arcs, circles, ellipses, [271`and rectangles. It also provides primitives for filling these figures. These have [271`been used by GPLOT to produce easy to use routines for drawing graphics [271`primitives. Some of these correspond in name and calling parameters with [271`DISSPLA routines for blanking areas, however the GPLOT routines only draw the [271`figures, and don't do blanking in most cases. The routine CLRREC can be used [271`to erase a rectangular area on devices which provide this capability (i.e. the HDS [271`graphics terminal, VAXstation, DECWindows terminals, Postscript printers). The [271`filling of these primitives is dependent on the state of the GKS Fill Area [271`Constants at the time of the call. For some devices an area can be erased by [271`setting the Fill Area Interior Style to solid and the Fill Area Color Index to the [271`background color. See Examples 8-10 to see how the filling is controlled by these [271`variables. [271` [271`[481`CALL BLREC (XORG,YORG,WIDE,HIGH,FRM) [271`[481` [271`[481`CALL BLTREC (XORG,YORG,WIDE,HIGH,ANG,FRM) [271`[481` [271`[481`CALL BLCIR (XORG,YORG,RADIUS,FRM) [271`[481` [271`[481`CALL BLELIP (XORG,YORG,RADX,RADY,ANG,FRM) [271`[481` [271`[481`CALL BLPOLY (XARAY,YARAY,NPTS,FRM) [271`[481` [271`[481`CALL BLSLIC (XORG,YORG,RADIUS,THETA1,THETA2,FRM,IARC) [271`[481`CALL ARC (XORG,YORG,RADIUS,THETA1,THETA2,ICLS,FRM)3 [271`[481` [271`[481`CALL ELARC [271`[481`(XORG,YORG,RAD1,RAD2,ANG,THETA1,THETA2,FRM,IARC) [271` [271`------------------------------ [271` [271`3.[321`GPLOT11 only. [271` [271`[271`GPLOT Graphics Routines [2046`Page 18 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[481`CALL ELPARC [271`[481`(XORG,YORG,RAD1,RAD2,ANG,THETA1,THETA2,ICLS,FRM)4 [271`[481` [271`where the first six routines correspond to DISSPLA routines except the call to [271`BLSLIC has an optional extra parameter, IARC, to indicate the type of circular [271`arc to be drawn. The three valid values of IARC are GATOPN=1, GATPIE=2, [271`and GATCHRD=3 to specify if the arc should be open, pie shaped or chord [271`shaped. ICLS is similar to IARC, except it is a one of the following character [271`strings: 'NONE', 'SLICE', or 'CHORD'. If the file [271`'SYS$LIBRARY:GKSDEFS.BND' is included by the drawing program, the symbolic [271`names for these parameters may be used, otherwise use the numbers. The routine [271`to draw elliptic arcs, ELARC, is similar to the routine for drawing circular arcs, [271`BLSLIC, except it requires both a major and minor radius for the ellipse. [271`Example plots 8-10 demonstrate the use of these graphic primitive routines. [271`There is a bug in the DEC GKS Postscript [271`driver which causes the ARC and ELPARC [271`routines to work incorrectly on Postscript [271`printers. [271` [271`12.  Bar Graphs [271` [271`[391`GPLOT contains routines to emulate the DISSPLA routines for drawing [271`vertical and horizontal bars. These subroutine calls are: [271` [271`[481`CALL VBARS (XARAY,Y1ARAY,Y2ARAY,NPTS) [271`[481` [271`[481`CALL HBARS (X1ARAY,X2ARAY,YARAY,NPTS) [271`[481` [271`[481`CALL BARPAT (ISTYLE) [271`[481` [271`[481`CALL BARWID (BARWTH) [271`[481` [271`[391`These work as the DISSPLA routines except GPLOT patterns are based on [271`the GKS standard patterns and there are only nine different patterns. Example 4 [271`in the Appendix demonstrates the use of these routines. [271` [271` [271`13.  Contouring Routines [271` [271`[391`GPLOT contains several routines for generating contour plots. The relevant [271`routines are CONMAK, CONLIN, and CONTUR. CONMAK makes the contour [271`lines and saves them in its internal data structures. CONLIN is used to set up [271`various line styles for the contour lines of different levels. CONTUR actually [271`plots the contour lines made by CONMAK according to the line styles established [271`by CONLIN. The call [271` [271`[391`CALL CONMAK (w, nx, ny, zIncrement) [271` [271`builds contour lines for a rectangular array of data values, w( , ). It is assumed [271`that w is dimensioned as w(nx,ny). w(i,j) should contain the data value [271`corresponding to the point (xi, yj) of a rectangular grid of points (xi,yj), i = [271`1,...,nx, j = 1,...,ny. The argument zIncrement gives the increment between [271` [271`------------------------------ [271` [271`4.[321`GPLOT11 only. [271` [271`[271`GPLOT Graphics Routines [2046`Page 19 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`contour levels. Alternatively, zIncrement can also be the character string constant [271`'SCALE', in which case CONMAK will choose rounded levels between the largest [271`and smallest values in w( , ) at which to draw contour lines. In either case [271`there will be a constant increment between contour lines, call it INCR, and [271`contour lines will be calculated for all Z levels of the form [271` [271`[391`K*INCR, K = ...,-1, 0, 1, ... [271` [271`which are between the largest and smallest values stored in w( , ). The call [271` [271`[391`CALL CONLIN (LineNum, MODE, 'NOLABELS', IThick, 1) [271` [271`sets up the characteristics to be used when drawing the contour lines. LineNum [271`is the "number" of the contour line whose characteristics are to be set. The [271`correspondence between the contour level K*INCR and LineNum is [271` [271`[391`LineNum = K MOD nLines [271` [271`where nLines is the total number of line characteristics set by calls to CONLIN. [271`[391`MODE may be one of [271` [271`[511`'SOLID'[781`--[901`use a solid line [271`[511`'DOT'[781`--[901`use a dotted line [271`[511`'DASH'[781`--[901`use a dashed line [271`[511`'CHNDOT'[781`--[901`use a chain dotted line [271`[511`'CHNDSH'[781`--[901`use a chain dashed line [271`[511`'MYCON'[781`--[901`use line characteristics as computed by the [271`[901`user supplied subroutine MYCON [271` [271`[391`The first five of these values select the specified line styles. If MODE is [271`'MYCON', the user must provide a subroutine by that name which will set the [271`line characteristics at run time. The use of MYCON is explained more fully [271`below. [271` [271`[391`The argument IThick is an integer specifying a thickness multiplier for line [271`LineNo. Specifically, if IThick = 3, a line three times thicker than the standard [271`line width will be used. [271` [271`[391`The remaining two arguments 'NOLABELS' and 1 must be passed in as [271`shown, but have no effect on the resulting plot. The routine [271` [271`[391`CALL CONTUR (nLines, 'NOLABELS', DrawFlag) [271` [271`draws the contour lines. The argument nLines must be the total number of line [271`characteristics set by calls to CONLIN. [271` [271`[391`The argument DrawFlag must be either of the character strings 'DRAW' or [271`'NODRAW'. This determines whether each contour line will be drawn or not [271`drawn by default. 'NODRAW' is only useful in conjunction with the user [271`supplied routine MYCON. MYCON can selectively permit lines at various levels [271`to be drawn in case the default is set to 'NODRAW'. [271` [271`[391`The remaining argument 'NOLABELS' must be passed in as shown, but has [271`no effect on the resulting plot.  [271`[271`GPLOT Graphics Routines [2046`Page 20 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271` [271`[391`If the MODE 'MYCON' was selected for a particular line characteristic, then [271`the user MUST supply a subroutine MYCON (RArray,IArray) which will be called [271`by CONTUR before a contour is plotted using that characteristic. In this way [271`MYCON can change the appearance of particular contour lines. The two [271`arguments of MYCON are arrays: [271` [271` REAL RArray(2) [271` INTEGER IArray(9) [271` [271`[391`Currently, the only positions in the arrays that are used are: [271` [271`[391`[631`RArray(1) --[1051`Contains the Z-level of the current contour line [271`[1051`being drawn. [271` [271`[391`[631`IArray(1) --[1051`Contains the value of current curve thickness [271`[1051`multiplier. This may be changed depending on [271`[1051`the Z-level to highlight specific levels if desired. [271` [271`[391`[631`IArray(9) --[1051`Contains the default curve drawing flag value. [271` [391`[631`[1051`0 = 'NODRAW' [271`[391`[631`[1051`1 = 'DRAW' [271`[391`[631`[1051`This may be changed to selectively omit or [271`[1051`include various Z-levels. [271` [271`[391`Example 13 in the Appendix illustrates the use of these routines. [271` [271` [271`14.  3 Dimensional Plotting [271` [271`[391`GPLOT now includes routines for drawing 3-Dimensional vectors, curves and [271`surfaces. The 3-Dimensional objects are drawn in a 3D region called the [271`"workbox" which can be viewed from various positions outside the workbox. [271` [271`[391`To use the 3-Dimensional plotting features in GPLOT, your program must [271`first set up the page and subplot area as for 2-Dimensional plots. The 3D [271`workbox will be projected into the subplot area specified in the call to AREA2D. [271`The projection used is determined from the 3D workbox and various viewing [271`parameters as described in the next two subsections. Meaningful defaults for the [271`workbox and viewing parameters are provided and the subroutines in the next two [271`sections may be omitted if the defaults are acceptable. [271` [271` [271`14.1 Setting the "workbox" [271` [271`[391`The 3D workbox can be specified using the routines Volm3D or Axes3D. [271`Specifically, the call [271` [271`[391`[541`CALL Volm3D( xSize, ySize, zSize ) [271` [271`would set the 3D workbox to extend from zero to xSize in the x direction, from [271`zero to ySize in the y direction, and from zero to zSize in the z direction. These [271`values adjust the 3D aspect ratios of the resulting plots. If all three parameters [271`are equal, the workbox will appear cubical. If zSize is much smaller than xSize  [271`[271`GPLOT Graphics Routines [2046`Page 21 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`and ySize, the resulting workbox will be quite flat. The workbox establishes a [271`coordinate system called the "absolute 3D" coordinate system. [271` [271`[391`Names can be applied to the axis using the calls [271` [271`[391`[541`CALL X3NAME( LxName, IxName ) [271`[391`[541`CALL Y3NAME( LyName, IyName ) [271`[391`[541`CALL Z3NAME( LzName, IzName ) [271` [271`in which the parameters have the same effect as in the corresponding 2D routines [271`XNAME, YNAME. [271` [271`[391`The above operations can be combined into one call to the routine Axes3D as [271`shown: [271` [271`[391`[541` CALL Axes3D( LxName, IxName, LyName, IyName, LzName, [271`[391`[541`1[691`IzName, xSize, ySize, zSize ) [271` [271`The default workbox size is 1.0 X 1.0 X 1.0 with blank labels. If these [271`defaults are satisfactory, calls to the above routines may be omitted. However, if [271`these routines are used, they must be used BEFORE Graf3D is called. [271` [271` [271`14.2 Setting the Viewing Parameters. [271` [271`[391`Once the workbox has been set up, the observer's position and the point at [271`which the observer is looking can be specified in one of several ways. The [271`observer's position is called the Center Of Projection or COP. The point at [271`which the obsever is looking is called the View Reference Point or VRP. [271` [271`To set the COP, use one of the calls: [271` [271`[391`[541`CALL VuAbs ( xAbs, yAbs, zAbs ) [271`[391`[541`CALL VuAngl( Phi, Theta, Radius ) [271`[391`[541`CALL View ( x3, y3, z3) [271` [271`The parameters xAbs, yAbs and zAbs specify the COP in terms of the "absolute [271`3D" coordinate system determined by the workbox. The parameters x3, y3 and z3 [271`specify the COP in terms of the "relative 3D" coordinate system that will be [271`placed on the workbox when Graf3D is called. [271` [271`The parameters to VuAngl specify the COP relative to the VRP as follows: [271`[391`Phi[631`-[721`specifies the angle in the xy-plane between the positive x axis [271`[721`and the projection of the ray from VRP to COP [271` [271`[391`Theta[631`-[721`specifies the angle between the ray from VRP to COP and the [271`[721`xy-plane. [271` [271`[391`Radius[631`-[721`specifies the distance from the VRP to the COP in absolute 3D [271`[721`coordinates. [271` [271`NOTE:[451`The default COP is at ( -1.5, -1.5, 1.5 ) in absolute 3D coordinates. If a [271`[451`program specifies the COP, it should be outside of the 3D workbox. IF [271`[451`the specified COP is too close to the workbox, GPlot will move it so that  [271`[271`GPLOT Graphics Routines [2046`Page 22 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[451`the distance between it and the center of the work box is at least 1.5 [271`[451`times the length of the diagonal of the workbox. If the specified COP is [271`[451`more than 20 times the workbox diagonal away, GPLOT will use 20 times [271`[451`the workbox diagonal. [271` [271` [271`To set the VRP, use one of the calls: [271` [271`[391`[541`CALL FclAbs( xAbs, yAbs, zAbs ) [271`[391`[541`CALL FclAng( Phi, Theta, Radius ) [271`[391`[541`CALL FclPt ( x3, y3, z3) [271` [271`The parameters to FclAbs and FclPt specify the VRP in terms of the "absolute [271`3D" and "relative 3D" coordinates respectively. [271` [271`The parameters to FclAng specifiy the VRP relative to the COP as follows: [271` [271`[391`Radius[631`-[721`specifies the distance from the COP to the VRP in absolute 3D [271`[721`coordinates. [271` [271`[391`Theta[631`-[721`specifies the angle between the ray from COP to VRP and the [271`[721`xy-plane. [271` [271`[391`Phi[631`-[721`specifies the angle in the xy-plane between the positive x axis [271`[721`and the projection of the ray from COP to VRP. [271` [271`FclAng should be called after VuAbs, or View have set the position of the COP [271`as desired. [271` [271`NOTE:[451`The default VRP is at ( 0.5, 0.5, 0.5 ) in absolute 3D coordinates. If a [271`[451`program specifies the VRP, it should lie in the 3D workbox. IF the [271`[451`specified VRP lies outside of the workbox, GPlot will move it into the 3D [271`[451`workbox. [271` [271`Ordinarily, GPLOT will adjust the projection of the workbox onto the screen so [271`that the entire workbox is visible. If desired, a program may adjust the [271`projection so that less of the workbox is visible in order to "zoom" in on one [271`part of a 3D object. This can be done using the call [271` [271`[391`[541`CALL VisAng( Angle ) [271` [271`Angle specifies the angle at the COP that is subtended by the virtual screen on [271`which the 3D world is projected. If Angle is made quite small, the effect is to [271`"zoom" in on a portion of the workbox. [271` [271`NOTE:[481`The GPLOT implementation of VisAng differs from the same named [271`[481`routine in DISSPLA. GPLOT always assumes a square virtual screen [271`[481`and so only one is specified whereas DISSPLA allows a rectangular [271`[481`screen specified by two angles. [271` [271`  [271`[271`GPLOT Graphics Routines [2046`Page 23 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`14.3 Establishing a "relative" coordinate system [271` [271`[391`The 3D workbox will be given a relative 3D coordinate system by a call to [271`Graf3D. Graf3D actually builds the projection as determined by the workbox and [271`other viewing parameters and draws the axis system. Consequently, GRAF3D [271`MUST be called AFTER the routines that establish the workbox and viewing [271`parameters mentioned above, but BEFORE any routines to draw 3D objects given [271`in the next section. Graf3D is called as follows: [271` [271`[511` CALL Graf3D([931`x3Orig, x3Step, x3Max, [271`[511`1[931`y3Orig, y3Step, y3Max, [271`[511`2[931`z3Orig, z3Step, z3Max ) [271` [271`[391`The parameters are interpreted in the same way as the parameters to the 2D [271`routine GRAF. [271` [271`[391`As with the 2D graf routines, many variations on the appearance of the axes [271`are allowed. This is accomplished using the calls [271` [271`[391`[541`CALL zIntAx [271`[391`[541`CALL zTicks( iTicks ) [271`[391`[541`CALL zRevTk [271`[391`[541`CALL zAxCtr [271`[391`[541`CALL zAxEnd( Flag ) [271`[391`[541`CALL zNoNum [271`[391`[541`CALL zAxAng( Angle ) [271`[391`[541`CALL zLabGr( LabelList, LabelLength, NLabels ) [271` [271`The corresponding 2D calls such as xIntAx, yNoNum, etc., will also affect the [271`appearance of the 3D axis system. [271` [271`The effect of these calls is generally similar to the corresponding 2D GPLOT and [271`DISSPLA calls. Note however that there are small differences in the [271`interpretation of some of the parameters between the 2D and 3D routines. For [271`example, the default direction for tick marks in 3D is directed outward from the [271`workbox. Also, the rotation Angle specified in xAxAng, yAxAng and zAxAng will [271`be interpreted as a rotation from a "normal" orientation which is parallel to the [271`axis with the top of the letters pointed towards the axis. However, as the [271`viewing parameters are changed, this would occasionally leave some of the [271`lettering oriented generally downward. GPLOT calculates the orientation of the [271`lettering and if it is "upside down" the lettering is rotated by 180 degrees. [271` [271` [271`14.4 3D Output [271` [271`[391`GPLOT provides 3 dimensional vectors, curves, and surfaces using the calls: [271` [271`[511` CALL Vectr3([931`xAbsFr, yAbsFr, zAbsFr, [271`[511`1[931`xAbsTo, yAbsTo, zAbsTo, IVEC ) [271` [271`[511` CALL RlVec3([931`xFrom, yFrom, zFrom, [271`[511`1[931`xTo, yTo, zTo, IVEC ) [271` [271`[511` CALL Curv3D( xAray, yAray, zAray, NPts, IMark )  [271`[271`GPLOT Graphics Routines [2046`Page 24 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271` [271`[511` CALL Surmat( ZMat, IXPts, IXDim, IYPts, IYDim, WkArea ) [271` [271`[391`The vector and curve routines are analogous to the corresponding 2D [271`routines. The parameters to Vectr3 specify 3D positions in "absolute 3D" [271`coordinates whereas the parameters to RlVec3 and Curv3D specify the coordinates [271`in terms of the "relative" coordinate system set up by the call to Graf3D. [271` [271` [271` [271`[391`3D surfaces are drawn using the routine Surmat. The parameters to Surmat [271`are: [271` [271`[391`ZMat[571`--[721`Real array with IxDim rows and IyDim columns, containing [271`[721`the z values of a grid of points defining the surface. The z [271`[721`values are specified in terms of "relative" coordinates. [271` [271`[391`IXPts[571`--[721`The increment between successive rows of ZMat that are to be [271`[721`used in drawing the surface. For example, if IXPts = 2, [271`[721`Surmat will only use the data from alternate rows of ZMat. [271` [271`[391`IYPts[571`--[721`The increment between successive columns of ZMat that are to [271`[721`be used in drawing the surface. For example, if IYPts = 3, [271`[721`Surmat will only use the data from every third column of [271`[721`ZMat. [271` [271`[391`IxDim, [271`[391`IyDim[571`--[721`The dimensions of the array ZMat [271` [271`[391`WkArea[721`--[841`Not used, but retained for compatability with DISSPLA. [271` [271`[391`Note that the x and y coordinates of the points on the surface are not [271`specified directly in the call to Surmat. It is assumed that ZMat contains the Z- [271`values of the surface evaluated on a grid of points (x,y) that are evenly spaced in [271`the x and y directions. By default the ranges of x and y values of the data [271`points are assumed to be the same as the ranges specified in the call to Graf3D. [271`These default ranges can be changed with the call [271` [271`[391`[541`CALL SurSze( XMin, XMax, YMin, YMax ) [271` [271`which specifies the new range of x and y values to be associated with the z [271`values in ZMat. This will NOT change the calibrations on the axes, or alter the [271`"relative" coordinate system specified in Graf3D, but will adjust the position and [271`shape of the surface relative to the workbox. [271` [271`[391`If a surface is to be constructed from data values that correspond to points [271`(x,y) that do not form a regular grid of points, some preprocessing of the surface [271`is necessary. GPlot provides the routines BGNMAT, MDFMAT, GETMAT and [271`ENDMAT to approximate the z-values of a surface on a regular grid of points [271`given points (x,y,z) which have x, y coordinates distributed randomly in the [271`rectangle [ X3Orig, X3Max ] )>K)0 [ Y3Orig, Y3Max ]. These routines may be used [271`to construct a matrix ZMat, with up to 101 rows and 101 columns from an [271`arbitrary number of scattered points. These routines are used as follows. The  [271`[271`GPLOT Graphics Routines [2046`Page 25 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`size of the matrix ZMat that is to be constructed first must be specified using [271`BGNMAT: [271` [271`[391`[541`CALL BGNMAT( IXDim, IYDim ) [271` [271`Then GETMAT would be called one or more times to approximate the effect on [271`the surface due to a collection of randomly scattered points (x,y,z). The call [271` [271`[391`[541`CALL GETMAT( xAray, yAray, zAray, nPoints, junk ) [271` [271`accepts three real arrays containing nPoints values specifying the coordinates of [271`scattered data points. (The parameter "junk" is retained for compatibility with [271`earlier versions of DISSPLA.) [271` [271`[391`It is assumed that each of the scattered points should add to the value of [271`the surface at nearby regularly spaced grid points. For each scattered data point, [271`(x,y,z), GETMAT accumulates the effect on each nearby grid point. [271` [271` [271` Finally, the call [271` [271`[391`[541`CALL ENDMAT( ZMat, junk ) [271` [271`produces the array of z values needed by Surmat from the information accumulated [271`during previous calls to GETMAT. The value returned in ZMat(i,j) is a weighted [271`average of the z-values of scattered data points (x,y,z) that were "close" to the [271`grid point (Xi, Yi). Each of the z values is weighted by [271` [271`[391`[541`Weight = 1/(Distance + Offset) ** Power [271` [271`where Distance is the distance from (x,y) to (Xi, Yi) and Offset is a small [271`positive value to avoid dividing by 0. Some of the parameters used in this [271`process are set by the call [271` [271`[391`[541`CALL MDFMAT( Ix, Iy, Power ) [271` [271`[391`Ix specifies the number of rows of ZMat above and below the data point [271`that are to be affected by the data point. Similarly, Iy specifies the number of [271`columns of ZMat left and right of the data point that are to be affected. Power [271`specifies the value of Power to be used in the calculation of the weight. The [271`default value for each of these quantities is 2. MDFMAT need not be called if [271`these defaults are acceptable. [271` [271` [271`15. Graphics Input [271` [271`[391`Graphics input can be obtained from input/output devices such as the [271`VAXstation, the VT240/241, and the Tektronix 4014 emulators like the HDS [271`2200GX. [271`  [271`[271`GPLOT Graphics Routines [2046`Page 26 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`15.1 Reading the Cursor Position [271` [271`To turn on the cursor and read the cursor position when input is terminated, use [271`the call: [271` [271`[391`CALL HWINPT(XPOS,YPOS) [271` [271`Input is terminated on the VAXstation by clicking the left-hand button on the [271`mouse. Input is terminated on the other devices by typing a RETURN. When [271`positioning the cursor on a Tektronix emulator, holding down the shift key before [271`pressing the arrow keys will speed up cursor movement. HWINPT will return the [271`cursor position in inches relative to the physical origin specified by the call to [271`AREA2D. To obtain the position in data units, use the call: [271` [271`[391`CALL HWDATA (XVAL,YVAL) [271` [271`If these routines are included when plotting on an output only device, an error [271`message will be returned. [271` [271`15.2 Using the Cursor to Modify the Plot [271` [271`[391`The subroutine CURSON was written to allow interaction with the plot on [271`some devices (currently only the VAXstation and the HDS terminals). It allows [271`displaying the cursor position, optionally adding cursor position or text [271`information to the plot and selecting a rectangular subplot area to zoom in on. [271`Use the following syntax to call CURSON: [271` [271`[391`CALL CURSON(KEY,X0,X1,Y0,Y1) [271` [271`where KEY is a CHARACTER*1 variable and X0,X1,Y0,Y1 are REAL*4 variables. [271`When CURSON is called the cursor cross hairs are turned on. On the [271`VAXstation, a continuous display of cursor position in data units will be displayed [271`in the upper right corner of the plot. On the HDS the cursor coordinates will be [271`displayed each time a return is typed. CURSON also allows input from the [271`keyboard to add text to or delete text from the plot. [271` [271`[391`It is recommended that both the hardcopy device and the screen device be [271`nominated before entering CURSON. The only Tektronix 4014 emulator which [271`currently supports all these features is the HDS graphics terminal, because a [271`proprietary erase function has been used. For more consistent results between the [271`screen and hardcopy when you use the HDS terminal as the screen device, [271`software fonts are used on postscript printers when both devices are nominated. [271`[391`The following keys are recognized by CURSON: [271` [271`[391`H[631`(D)[841`Set text direction horizontal [271`[391`V[631`[841`Set text direction vertical [271`[391`-[631`[841`Set text direction upside down and backward [271`[391`A[631`[841`Allow input of text angle (default is 0.0)>)0) [271`[391`X[631`[841`Write x-coordinate on plot [271`[391`Y[631`[841`Write y-coordinate on plot [271`[391`P[631`[841`Write both x and y coordinates on plot [271`[391`G[631`[841`Enter beginning/ending position of vector/arrow [271`[391`W[631`[841`Enter arrowhead type to be used in G command. [271`[841`(Default is IVEC=0, no arrowhead)  [271`[271`GPLOT Graphics Routines [2046`Page 27 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[391`T[631`[841`Write Text on plot (you are prompted for input) The text [271`[841`will be in the current default size. An up-arrow will [271`[841`cause text to go into superscript mode and a down-arrow [271`[841`will cause it to go into subscript mode. The right-arrow [271`[841`will cause text size to be 1.5 times the default size and [271`[841`the left-arrow will cause it to be 0.67 times the default [271`[841`size. Use PF2 to end superscript mode, subscript mode, [271`[841`or to return to the default size. PF3-G will cause text to [271`[841`go into Greek mode. PF3-N will set text back to normal. [271`[841`While in text mode, the DELETE key can be used to [271`[841`delete the previously typed character. The area erased on [271`[841`the screen may be larger than it should be if you are in [271`[841`superscript mode subscript mode, or at some text angles. [271`[391`B[631`[841`Write x and y coordinates to plot and to a file (writing [271`[841`to a file not yet implemented) [271`[391`C[631`[841`Write x-coordinate to plot and to a file (writing to a file [271`[841`not yet implemented) [271`[391`L,U[631`[841`defines the Lower left and Upper right corner of a box [271`[841`which will be drawn on the screen. Once a box has been [271`[841`drawn the Zoom command may be used to zoom in on [271`[841`the selected region. [271`[391`Z[631`[841`Zoom in to selected box region, or Zoom back out to [271`[841`original region. [271`[391`D[631`[841`Delete previous segment added to plot. [271`[391`Q[631`[841`Quit editing plot without saving additions (plot will be [271`[841`redrawn on the screen without additions). [271`[391`E[631`[841`Exit from CURSON and save additions to plot.  [271`[271`GPLOT Graphics Routines -- Index[2046`Page 28 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[1169`Index [271`[271`A [271`ANGLE, 8, 11, 22, 23, 24, 27, 28 [271`AREA2D, 4, 5, 6, 20, 26, 28 [271` [271`B [271`BARPAT, 18, 28 [271`BARS, i, 1, 13, 18, 28 [271`BARWID, 18, 28 [271`BGNMAT, 25 [271`BLCIR, 17, 28 [271`BLELIP, 17, 28 [271`BLPOLY, 17, 28 [271`BLREC, 17, 28 [271`BLSLIC, 17, 18, 28 [271`BLTREC, 17, 28 [271` [271`C [271`CARTOG, 8, 28 [271`CGMCO, 3 [271`CGMTO, 3 [271`CHNDOT, 13, 28 [271`CHNDSH, 13, 28 [271`CHRMSG, 7, 10, 28 [271`COMPLX, 8, 28 [271`COMPRS, 3 [271`CONLIN, 18, 19, 20, 28 [271`CONMAK, 18, 19, 28 [271`CONTUR, 18, 19, 20, 28 [271`CROSS, 11, 26, 28 [271`CURSON, 26, 27 [271`CURV3D, 24 [271`CURVE, 1, 4, 13, 15, 16, 20, 24, 28 [271` [271`D [271`DASH, 13, 28 [271`define plotter, 2, 3, 28 [271`define screen, 2, 28 [271`DOT, 13, 28 [271`DOTGRID, 13, 28 [271`DUPLX, 8, 28 [271` [271`E [271`EDIT_GMENU, 2 [271`ELARC, 18, 28 [271`EMARK, 13, 28 [271`ENDGR, 5, 28 [271`ENDMAT, 25 [271`ENDPL, 4, 28 [271`EXCRV, 13, 28 [271`EXYCRV, 13, 28 [271`EYCRV, 13, 28 [271` [271`F  [271`[271`[271`GPLOT Graphics Routines -- Index[2046`Page 29 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[271`FASHON, 8, 28 [271`FCLABS, 22 [271`FCLANG, 22 [271`FCLPT, 22 [271`FONT, i, 7, 8, 9, 10, 28 [271`fontid, 8, 29 [271`FRAME, 6, 29 [271`FUTURA, 8, 29 [271` [271`G [271`GETMAT, 25 [271`GKSM, 3, 29 [271`GMENU, 2, 3, 29 [271`gothic, 8, 29 [271`GRACE, 6, 29 [271`GRAF, 4, 5, 11, 12, 23, 29 [271`GRAF3D, 21, 22, 23, 24, 25 [271`greek, 7, 8, 27, 29 [271`GRID, 12, 13, 19, 24, 25, 29 [271`GSCHH, 8, 29 [271`GSCHUP, 8, 29 [271`GSTART, 2, 3, 29 [271`GSTOP, 4, 29 [271`GSTXFP, 8, 29 [271`GTX, 7, 10, 29 [271` [271`H [271`HBARS, 18, 29 [271`HEADIN, 7, 29 [271`HEIGHT, 7, 8, 10, 14, 29 [271`HP7550, 3 [271`HWDATA, 26, 29 [271`HWINPT, 26, 29 [271` [271`I [271`instruction, i, 10, 29 [271`INTAXS, 11, 29 [271`INTNO, 7, 29 [271` [271`L [271`LA50, 3, 29 [271`LA75, 3, 29 [271`LEGEND, 1, 15, 16, 29 [271`LINEAR, i, 1, 12, 15, 29 [271`LINES, 7, 13, 14, 15, 16, 17, 18, 19, 20, 29 [271`LINEST, 29 [271`LN03TK, 3 [271`LOGLOG, 12, 29 [271`LW, 2, 3, 29 [271` [271`M [271`MARKER, 4, 14, 15, 29 [271`mathematical, 8, 29 [271`MDFMAT, 25, 26  [271`[271`[271`GPLOT Graphics Routines -- Index[2046`Page 30 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[271`MESSAG, 7, 29 [271`MXIALF, 10, 29 [271`MYLEGN, 16, 29 [271` [271`N [271`NEWCLR, 14, 30 [271`NOBRDR, 6, 30 [271` [271`O [271`OREL, 5, 11, 30 [271` [271`P [271`PAGE, i, 1, 4, 5, 6, 11, 20, 30 [271`pagex, 4, 5, 30 [271`pagey, 4, 5, 30 [271`PARA3, 15, 30 [271`PARA5, 15, 30 [271`PHYSOR, 5, 11, 30 [271`picfac, 14, 30 [271`POLY3, 15, 30 [271`POLY5, 15, 30 [271`POSTSCRIPT, 3, 8, 9, 10, 14, 17, 18, 27, 30 [271`precis, 8, 30 [271`PSPLIN, 15, 30 [271` [271`Q [271`QMS, 3 [271` [271`R [271`REALNO, 7, 30 [271`RLINT, 7, 30 [271`RLMESS, 7, 30 [271`RLREAL, 7, 30 [271`RLVEC, 16, 30 [271`RLVEC3, 24 [271`russian, 8, 30 [271` [271`S [271`SCLPIC, 14, 30 [271`SCMPLX, 8, 30 [271`script, 8, 30 [271`SERIF, 8, 30 [271`SETCLR, 30 [271`SIMPLX, 8, 30 [271`SOLID, 13, 16, 17, 19, 30 [271`special, 1, 5, 7, 8, 10, 13, 30 [271`SPLINE, 15, 30 [271`standard, 1, 7, 8, 18, 19, 30 [271`STEP, 11, 12, 15, 30 [271`SURMAT, 24, 25 [271`SWISSB, 8, 30 [271`SWISSL, 8, 30 [271`SWISSM, 8, 30 [271`symbols, 1, 4, 7, 14, 30  [271`[271`[271`GPLOT Graphics Routines -- Index[2046`Page 31 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[271` [271`T [271`TALRS3, 3, 30 [271`THKCRV, 13, 14, 30 [271`THKFRM, 6, 30 [271`TK4014, 2, 3, 31 [271`TK4014F, 3, 31 [271`TRIPLX, 8, 31 [271` [271`V [271`VAXSTATION, 2, 3, 17, 26, 31 [271`VBARS, 18, 31 [271`VECTOR, 16, 17, 24, 31 [271`VECTR3, 24 [271`VIEW, 4, 21, 22 [271`VISANG, 23 [271`VOLM3D, 21 [271`VT330, 3, 31 [271`VT340, 3, 31 [271`VUANGL, 22 [271` [271`X [271`XAXANG, 24, 31 [271`XAXEND, 11, 31 [271`xaxis, 11, 31 [271`xcycle, 12, 31 [271`XGRAF, 12, 31 [271`XGRAXS, 5, 11, 31 [271`XINT, 7, 31 [271`XINTAX, 11, 23, 31 [271`XINVRS, 6, 31 [271`XLOG, 12, 31 [271`xmax, 4, 11, 12, 25, 31 [271`XMESS, 7, 31 [271`XNAME, 4, 10, 11, 21, 31 [271`xorig, 11, 31 [271`XPOSN, 6, 31 [271`XREAL, 7, 31 [271`XREVTK, 11, 31 [271`xstep, 4, 11, 12, 31 [271` [271`Y [271`YAXANG, 24, 31 [271`YAXEND, 11, 31 [271`yaxis, 4, 11, 31 [271`ycycle, 12, 31 [271`YGRAF, 12, 31 [271`YGRAXS, 5, 11, 31 [271`YINTAX, 11, 31 [271`YINVRS, 6, 31 [271`YLABGR, 12, 31 [271`YLOG, 12, 31 [271`ymax, 11, 25, 31 [271`YNAME, 4, 10, 11, 21, 31  [271`[271`[271`GPLOT Graphics Routines -- Index[2046`Page 32 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[271`YNONUM, 23, 31 [271`yorig, 4, 11, 12, 31 [271`YPOSN, 6, 31 [271`YREVTK, 11, 31 [271`ystep, 4, 11, 12, 31 [271` [271`Z [271`ZAXANG, 24 [271`ZAXCTR, 23 [271`ZINTAX, 23 [271`ZNONUM, 23 [271`ZREVTK, 23  [271`[271`[271`GPLOT Graphics Routines -- Examples[2046`Page 33 [271`(0qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(B [271` [271`[271`[271`[1131`Examples [271`)>Example programs and their output are attached, but they are not included in the [271`table of contents or index.