.;Start of PREFAC.RNO .;NOTE: This document is designed to be processed by DSR, .; DEC Standard RUNOFF. It is documented in DOC:NRUNOF .; and is invoked via ".R DSR". .left margin 5.right margin 64.spacing 1.autoparagraph .layout 2,2.display number rl.number.;"rl" = Use roman numerals, lowercase .flag capital < .literal PPPP L OOO TTTTT P P L O O T PPPP L O O T P L O O T P LLLLL OOO T M M AAA N N U U AAA L MM MM A A NN N U U A A L M M M AAAAA N N N U U AAAAA L M M A A N N U U A A L M M A A N N UUU A A LLLLL .end literal .skip 4.center;CSM Plotting Manual .skip .center;******** 1st draft for version 12A ******** .center;As of: March 10, 1983 *** NOT FINISHED YET *** .center;** This document has NOT been approved for printing ** .skip 3 .center;Colorado School of Mines - Computing Center .center;1600 Illinois Street .center;Golden, CO 80401 .center;(303)273-3430 .skip 2 This manual describes the hardware and software available for plotting at the Colorado School of Mines. The plotting package is a set of FORTRAN-callable routines written in MACRO-10 assembly language. In general, the plotting package is compatible with routines supplied by DEC (Digital Equipment Corporation) for use with the XY-10 CALCOMP plotter, but with additional features. .;End of PREFAC.RNO .;Start of PLTMAN.RNC .;NOTE: This table of contents has to be generated manually because .; DEC did not distrubute all 3 EXE files for DSR(NRUNOF). .; Missing are TOC.EXE (Table of Contents) and TCI.EXE (Two Column Index). .left margin 0.right margin 64.spacing 1.autoparagraph .page .center;Table of contents for Plotting Manual .skip 3 .literal Chapter 1 Policies 1.1 Distribution 1.2 Copies 1.3 Graphic Terminals 1.4 Window Size 1.5 Standard Plotter Defaults Chapter 2 Hardware 2.1 General 2.2 Houston Instruments DP-8 Plotter 2.3 ARDS Graphics Terminal 2.4 Tektronix Graphics Terminal 2.5 GIGI Graphics Terminal 2.6 ReGIS Plotter Chapter 3 Software 3.1 General 3.2 Monitor PLOT Command 3.3 Plot Window 3.4 Coordinate System 3.5 Symbol sets 3.6 TEK Program Chapter 4 Plotting Routines 4.1 Core Plotting Routines 4.1.1 Subroutine ERASE 4.1.2 Subroutine FACTOR 4.1.3 Subroutine NEWPEN 4.1.4 Subroutine OPRTXT 4.1.4 Subroutine ORIGIN 4.1.6 Subroutine PAUSEP 4.1.7 Subroutine PLOT 4.1.8 Subroutine PLOTS 4.1.9 Subroutine ROTATE 4.1.10 Subroutine SETWIN 4.1.11 Subroutine SUBWIN 4.1.12 Subroutine TITLE 4.1.13 Subroutine WHERE 4.1.14 Subroutine XHAIRS 4.2 Graphing Routines 4.2.1 Subroutine AXES 4.2.2 Subroutine AXIS 4.2.3 Subroutine DASHLN 4.2.4 Subroutine GRID 4.2.5 Subroutine LINE 4.2.6 Subroutine LOGAX 4.2.7 Subroutine LOGAXS 4.2.8 Subroutine SCALE 4.3 Labeling Routines 4.3.1 Subroutine NUMBER 4.3.2 Subroutine SETSYM 4.3.3 Subroutine SYMBOL 4.4 Obsolete Routines 4.4.1 Function IPLOT 4.4.2 Function ISETAB 4.4.3 Function MSETAB Chapter 5 3-D and Contouring Routines 5.1 Contouring Routines 5.1.1 Subroutine CALCNT 5.1.2 Subroutine CALSIZ 5.1.3 Subroutine GRIDER 5.2 3-D Routines Chapter 6 Programming Techniques 6.1 Starting and Stopping Plotting 6.2 Debugging Techniques 6.3 Warning and Error Messages Appendix A Sample Programs A.1 LINPLT A.2 SYMBOL Tables Appendix B Library Programs B.1 LBY:EZPLOT B.2 LBY:GRAPH B.3 LBY:SIMPLT B.4 SYS:DRAW Appendix C Further Documentation C.1 HELP files C.2 DOC:PLOT.DOC Appendix D SYMBOL Tables D.1 CSM Standard D.2 CSM Secondary D.3 Olde English D.4 Old German D.5 Old Italian D.6 Script D.7 Simplex Roman D.8 Simplex Italics D.9 Triplex Roman D.10 Triplex Italics D.11 Hershey's letters D.12 Simplex Greek D.13 Duplex Greek Index .end literal .page .display number d.;Use decimal notation .;End of PLTMAN.RNC .;Start of POLICY.RNO .chapter POLICIES .left margin 5.right margin 64.spacing 1.autoparagraph .display number d .title Policies .indent -5.hl 1 DISTRIBUTION. .index Policies .index Policies >Distribution Plots sent to the Houston Instruments DP-8 plotter will be .index ^Houston ^Instruments Copies The preferred method of making multiple copies is to duplicate a single copy of a plot on a copying machine. This method is much less expensive than plotting each copy that is needed. If multiple copies are needed, and duplicating is not possible (eg. a 36 by 36 inch plot with multiple colors), the use of the /COPIES:n switch with the plot command will cause multiple copies of the plot without the expense of running the plotting program repeatedly. Misuse of the copies specification may result in loss of plotting privileges. .indent -5.hl 1 GRAPHIC TERMINALS. .index Policies >Graphics terminal .index Graphics terminal >Policies .index Window size The plotting software by default limits a plot to a size of 11 by 11 inches. Attempts to exceed this window are considered to be errors unless the window size has been increased. With evidence of plotting ability, the user can have his allowed maximum window size expanded beyond the standard 11 by 11 inches. Permission to expand the window can be requested by submitting the Request for Plotting Window Increase form which is available at the Dispatch counter. The overall maximum window size possible on the DP-8 plotter is 35 by 240 inches. .index ^Houston ^Instruments Window size .indent -5.hl 1 STANDARD PLOTTER DEFAULTS. .index Policies >Standard plotter defaults .index Plotter >Defaults .blank PAPER#-#Standard#=#12#inches#wide,#/FORMS:NORMAL .break ######Extra#Wide#=#36#inches#wide,#/FORMS:P311 .index Paper >Hardware .index Hardware >^Houston ^Instruments ^Houston ^Instruments monitor command A special system program called SPROUT .index +X 240 inches max ) P O ( 0! ) O O ( ) O L -------------------------------------------------- L .end literal.skip 5 .center;Drum plotter operation There are two ways to use the SPOOLER package: .list .list element;Use 'SPOOL' for IPLT in CALL#PLOTS(IERR,'SPOOL'). .index 'Hardware .index Hardware >Graphics terminal .index Hardware >'Hardware .index Hardware >Graphics terminal .index Hardware >'^Re'Monitor command .index Monitor switches .index Monitor command >switches ^&Switch############Description\& .left margin 15.paragraph -10 /COPIES:n#######Output the specified file(s) repeatedly n times. The use of a photocopier is strongly suggested instead of this switch, since the duplication costs are less, and this also frees the plotter for use by other users. /DISPOSE:DELETE##Delete the named file(s) after output. /DISPOSE:PRESERVE##Save the file after output. /DISPOSE:RENAME##Remove the file from your directory immediately, and plot it from the QUE: area. This is the default action for ".PLT" files. /FORMS:name#####Place the output on a non-standard form. Standard forms are 12 inch (11 useable plotting inches) white plotter paper. 36 inch paper (35 useable plotting inches) has a form name of P311. /KILL###########Remove the specified job from the plotter output queue. /MODIFY#########Modify the specified plot queue entry. Must be used to alter the switches used in previously requested jobs. .left margin 5.autoparagraph.paragraph 5,1,5 All other switches available are documented in the CSM Users Handbook and in the DECsystem-10 Operating System Commands Manual (under the QUEUE command). .index Monitor examples .index Monitor command >examples .blank 3 .center;^&EXAMPLES\& .blank .no fill Example: To plot the spooled plotter files you have generated; .blank 1.center; &.PLOT *.PLT .blank 1 Example: To remove the request for EZPLOT from the queue (the equals sign is required); .blank 1.center; &.PLOT EZPLOT=/KILL .blank 1.center; or .blank 1.center; &.CANCEL PLOT EZPLOT .blank 1 Example: To check the status of the PLOT queue; .blank 1.center;&.PLOT .fill.justify .;End of SOFTW.RNO .;Start of WINDOW.RNO .test page 30 .left margin 5.right margin 64.spacing 1.autoparagraph .test page 5.indent -5.hl 1 PLOT WINDOW. .index Window The CSM graphics software observes a limitation on the useable plotting area, which is called the plotting window. The main reason for the plot window is to prevent undebugged programs from going wild and wasting plotter paper. The window starts as being 11 inches wide by 11 inches high. The user can move the pen anywhere inside the window, but any line that attempts to go outside the window will be truncated at the border. The pen is not allowed to move outside the window, but its theoretic position is still calculated. When the pen movement returns to inside the window, plotting resumes at the correct position. A message can be sent to the user each time the pen movement exceeds the plot window. The number of messages actually sent depends on what is specified to subroutine PLOTS. The plot window starts out as being 11 by 11 inches, with the origin of X = 0, Y = 0 being the lower left corner. The window can be made smaller by calling SETWIN, such as to limit the plot to an 8.5 by 11 inch area. Special privileges are required to extend the window past the 11 by 11 inch limit. .index Universal .index Window >Subwindow The window as set by SETWIN is known as the universal window. It is an absolute limit of pen travel. There is also a second type of window, known as the subwindow. The subwindow can be turned on and off at will, and can be anywhere inside of the universal window. The subwindow is useful for limiting a section of the plot to a smaller area. For instance: the user can call SETWIN to limit the entire plot to an 8.5 by 11 inch area. Then call SUBWIN to limit a graph to a 5 by 4 inch window. The user calls SUBWIN again to turn off the subwindow checking, to plot a title outside of the area, such as "Figure#1". SUBWIN may be called again to define a limit for figure 2, and turned off again to plot the caption "Figure#2". .index Coordinate System The plotter software is based on a standard Cartesian coordinate system that uses the inch as a basic unit of measure. Angles used in the plotting package are assumed to be in degrees, and are measured relative to the positive X axis, in a counter-clockwise direction as in the standard trigonometric convention. .test page 20.literal 90 Y ^ ! ! ! +angle ! 180 --------+--------> X 0 ! ! -angle ! ! 270 .end literal .center; Coordinate system conventions. .blank When the plot is first started, the origin is set to the lower .index origin left corner of the window. This default allows only positive X and Y coordinates until the origin is shifted by CALL#PLOT(XORG,YORG,-3). Whenever PLOT is called with the function code of -3, the pen moves to .index Symbol sets .index Symbol sets >standard symbol library .index Standard Symbol library There are two routines available for drawing text on the plot; TITLE and SYMBOL. Subroutine TITLE is limited to a single character set and angles that are multiples of 45 degrees. It uses the hardware character generator if possible, otherwise TITLE calls subroutine SYMBOL. (Currently, only the GIGI and ReGIS plotter have this feature.) The SYMBOL routine allow complete freedom in the choice of position and angle of characters generated by labeling routines. There are currently thirteen different types of character sets and one set of centered symbols. The different character sets are described in the "LABELING ROUTINES" section, and examples are in the appendix. .;End of SYM.RNO .;Start of TEK.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 5.indent -5.hl 1 TEK PROGRAM .index Plotting subroutines The routines that follow are the core routines of the plotting package. They are written in MACRO-10 assembly language and handle the actual movement of the pen, in a manner suitable for the hardware selected. The standard default plotting package outputs to the Houston Instruments DP-8 plotter, .index ^Houston ^Instruments 0) select a pen to use. IERR is returned as zero if the pen number is legal, otherwise as -1. .left margin 5 IERR####(output parameter) The error flag or number of pen. .skip 2 .literal DP-8 DMP4R GIGI and VT125 ---- ----- ----------------- IPEN=1 Blue Blue Light blue (cyan) IPEN=2 Black Black White (not black) IPEN=3 Red Red Red-purple .end literal Values of IPEN greater than 3 work only for the Houston Instruments DMP4-R table-top plotter. The pens on this plotter can be re-arranged .index ^^DMP-4R by the user. Calling NEWPEN has no affect on the Tektronix 4000-series terminals. .index subroutine .index Subroutine >close .index terminate (IC >#13 or IC <-13) Unimplemented operation. Currently, if the absolute value of IC is greater than 13, it is the same as if IC was 999, and terminates the plot. The value of 999 should be used to terminate the plot, as more modes may be implemented in the future. .skip CALL#PLOT(X,Y,-999) will abort the plot, and avoid creating a plot file. .index 999 >open .index initiate It also sets a counter for listing "Plot Window Exceeded" messages. .note PLOTS must be called before ^&ANY\& call to a plot routine to initialize the output plot file. .end note .blank.center;********** calling sequence ********** .blank .center;IERR = some number################ .center;CALL PLOTS (IERR,IPLT)############ .center;IF(IERR.NE.0) STOP 'PLOTS failure' .blank .center;or .blank .center;CALL PLOTS (IERR,IPLT,DFILE) .blank .center;************************************** .test page 14.autotable .left margin 20.paragraph -15,1 IERR##(input#parameter) is a flag to set error message type-out: .paragraph -9,0 (IERR#=#0) don't type warnings. (IERR#_>#0) type only the warning message. (IERR#_<#0) type the warning message and trace the call to subroutine PLOT. The absolute value of IWARN will be the maximum number of warnings to be typed. (IERR#=#999) do not erase the screen if running on a graphics terminal. .index 999 >#0) means plot file creation error. .test page 15 .paragraph -15,1 IPLT##(input#parameter) specifies the type of plotter. .paragraph -9,0 ###0####Use the default plotter ('SPOOL') 'PLOT'##Same as 0 'SPOOL'#Spooled output to the Houston Instruments ########DP-8 plotter 'DP-8'##Same as 'SPOOL' #'TEK'##Output to TEKTRONIX 4000-series terminal #4006###Same as 'TEK' #4012###Same as 'TEK' #4025###Same as 'TEK' 'REGIS'#Output to ReGIS type terminal 'GIGI'##Same as 'REGIS' 'DMP4R'#Houston Instruments DMP-4R ReGIS plotter #'TTY'##Same as 'TEK' or 'GIGI' depending on terminal .paragraph -15,1 DFILE#(optional#input#parameter) specifies the device and/or file name for the plot file. This must be less than 10 characters enclosed by single quotes, or a double-precision variable. .autoparagraph .left margin 5.paragraph 5,1 .blank.center;^&EXAMPLE\& .literal IERR = -2 CALL PLOTS(IERR,0) IF (IERR.NE.0) STOP '?PLOTS failure' .end literal Specifying IPLT as the integer zero means to use the default plotter (normally 'SPOOL', but 'TEK' if SYS:TEKPLT.REL is loaded). The value of IERR = -2 on input will cause a maximum of two error messages and a trace of the erroneous calls to be typed. If IERR is not returned as zero, the program will stop and type "?PLOTS failure". .;End of PLOTS.RNO .;Start of ROTATE.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30.indent -5.hl 2 ^&Subroutine 'ROTATE'\& .index 0) add ANGLE to the current rotation angle. (IFUNC _< 0) set the angle of rotation to ANGLE. .paragraph -15,1 (XPOS,YPOS)##is the position in inches for the center of rotation. NOTE: This is an absolute position on the paper, and is not affected by CALL FACTOR. .index ^^FACTOR This absolute origin cancels any previous relative origin that may have been set by CALL PLOT(X,Y,-3). .index ^^PLOT(X,Y,-3) ANGLE###(input parameter) is the angle of rotation. It is specified in degrees, not in radians. .left margin 5.paragraph 5,1 .autoparagraph .blank.center;^&Example\& The user is charged by the width of the plot. If a plotting program is set up to use an area 8.5 inches high by 11.0 inches wide, plot paper will be conserved if the plot is rotated so that it is 8.5 inches wide by 11.0 inches high. This can be accomplished by adding two statements after the call to PLOTS. .blank.test page 10 .literal CALL SETWIN (8.5, 11.0) CALL ROTATE (1, 8.5, 0.0, 90.0) .end literal .left margin 5.paragraph 5,1 The first statement makes sure that the plot is limited to 8.5 inches wide by 11.0 inches high. The second one moves 8.5 inches to the right along the X axis, rotates the plot 90 degrees counterclockwise, and makes this point the new origin. The positive X axis now points up, and the positive Y axis points to the left. .blank.center;^&Example\& .literal CALL FACTOR(0.5) !Reduce size of plot CALL PLOT(1.0,2.0,-3) !Origin is (0.5,1.0) CALL ROTATE(-1,4.0,5.0,90.0) !Origin is (3.0,5.0) .end literal Before the call to ROTATE, the origin was at (0.5*1.0,0.5*2.0) or (0.5,1.0) because FACTOR affects the origin set by PLOT(X,Y,-3). Then ROTATE used (4.0,5.0) as the center of rotation because it uses absolute coordinates in inches along the paper, and is unaffected by FACTOR or PLOT(X,Y,-3). After this rotation, the 0.5 inch X-origin offset and the 1.0 inch Y-origin offset have been canceled. If your program uses subroutine ROTATE, then better results will be obtained by using .center;CALL ORIGIN('ABS',XORIG,YORIG) .index ^^ORIGIN .center;or .center;CALL ROTATE(-1,XORIG,YORIG,0.0) instead of .center;CALL ORIGIN('REL',XORIG,YORIG) .center;or .center;CALL PLOT(XORIG,YORIG,-3) to change the origin. .;End of ROTATE.RNO .;Start of SETWIN.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 2 ^&Subroutine 'SETWIN'\& .index <WHERE This routine allows the user to check on the status of the plotter, the current pen position, current FACTOR value and the type of plotting package that was selected by subroutine PLOTS. .index <PLOTS This routine will normally be used to optimize plotter movement. .blank.center;********** calling sequence ********** .blank.center;CALL WHERE (X,Y) .blank.center;or .blank.center;CALL WHERE (X,Y,FACTX,IPLT,FACTY) .blank.center;************************************** .autotable .left margin 20.paragraph -15,1 X######(output#parameter) is the X coordinate of the current pen position, in inches. Y######(output#parameter) is the Y coordinate of the current pen position, in inches. IPLT####(optional output parameter) is the type of plotter in use. .paragraph -9,0 (IPLT = 1) using the DP-8 spooler. .index ^Houston ^Instruments <DP-8 (IPLT = 2) using the ARDS package. .index <ARDS (IPLT = 3) using the TEKTRONIX package. .index <TEKTRONIX (IPLT = 4) using the ReGIS package. (GIGI, DMP4R, VT125) .index <GIGI .index ^^ReGIS .index ^^DMP-4R .index <VT125 .paragraph -15,1 FACTX###(optional output parameter) is the factor value for the X direction. .index <FACTOR FACTY###(optional output parameter) is the factor value for the Y direction. .autoparagraph .left margin 5.paragraph 5,1 The values returned for X and Y take into account any rotation, scaling factors, and the current origin. If these values were to be used in the next call to PLOT, the pen will not move. .test page 10 .blank.center;^&Example\& .blank .center;CALL WHERE(X,Y,FACTR,IPLT)###################### .center;IF (IPLT .EQ. 3) CALL FACTOR (0.7*FACTR)###!TEK# .center;IF (IPLT .EQ. 4) CALL FACTOR (FACTR*2./3.)#!GIGI .autoparagraph .paragraph 5,1 This determines which type of plotter is in use. Since the TEKTRONIX screen is only 7.8 inches tall, the scale factor of 0.7 ensures that all 11 inches of the plot will be visible. For a GIGI or VT125 terminal, a scaling factor of 0.666667 is needed. Since moving long distances with the pen up wastes plotter time, subroutine WHERE can be used to improve efficiency. If possible, draw long lines by moving to the endpoint closest to the current position first and then plot the line. .;End of WHERE.RNO .;Start of XHAIRS.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 50 .indent -5.hl 2 ^&Subroutine 'XHAIRS'\& .index <XHAIRS .index Subroutine ><XHAIRS XHAIRS allows the user to turn on the crosshairs on a TEKTRONIX or GIGI terminal. The user positions the crosshairs and types a single character. The position and the character are transmitted to the program. If the character is a Control-Z, the screen will be cleared, zeros will be returned for all parameters, and the origin will be set to the lower left hand corner of the screen. .blank.center;********** calling sequence ********** .blank.center;CALL XHAIRS (XPOX,YPOS,LETTER) .blank.center;************************************** .left margin 14 .blank.indent -9 XPOS####(output parameter) is the X coordinate, in inches, of the crosshair. .blank.indent -9 YPOS####(output parameter) is the Y coordinate, in inches, of the crosshair. .blank.indent -9 LETTER##(output parameter) is the character typed. Normal characters are returned in an 'A1' format, control characters are returned as a number between 1 and 31, in an 'R1' format. .left margin 5 .note XPOS and YPOS are relative to the current origin and factor value. This routine is only available in the TEKTRONIX and GIGI plotting package. .end note .blank.center;^&Example\& .blank .left margin 12.no fill CALL XHAIRS (XPOS, YPOS, LETTER) IF (LETTER .EQ. 'U') CALL PLOT (XPOS, YPOS, 3) !Up IF (LETTER .EQ. 'D') CALL PLOT (XPOS, YPOS, 2) !Down .left margin 5.fill .;End of XHAIRS.RNO .;Start of GRAPHI.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .title Graphing Routines .test page 50.indent -5.hl 1 GRAPHING ROUTINES .index Graphing routines The routines that follow in this section are designed to aid in the generation of graphs by drawing the axes, scaling the data, and drawing the data points on the graph. Care should be taken in choosing the best axis drawing routine to fit the data involved. These routines are the included in FORLIB, the FORTRAN library. Unlike the CALCNT and PLOT3D routines, FORLIB routines get loaded automatically whenever they are needed. .skip 3 The Graphing Routines are: .list .le;AXES###- Draw a fancy X or Y axis. .le;AXIS###- Draw a simple X or Y axis. .le;DASHLN#- Draw a dashed line between 2 points. .le;GRID###- Draw a rectilinear grid. .le;LINE###- Draw a line from an array of X and Y. .le;LOGAX##- Draw a simple logarithmic axis. .le;LOGAXS#- Draw a fancy logarithmic axis. .le;SCALE##- Do scaling for subroutine LINE. .end list .;End of GRAPHI.RNO .;Start of AXES.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 2 ^&Subroutine 'AXES'\& .index <AXES .index Subroutine ><AXES AXES provides the user with the capability of generating and labeling an axis by drawing a line of arbitrary length divided into variable length segments by 'tick' marks. The variable value can be written as an annotation beside each mark. The axis can also be labeled if the user desires with special parameters for labeling and segment lengths. .blank.center;********** calling sequence ********** .blank.center;CALL AXES (X0,Y0,ITITLE,NCHR,AXSLEN,ANGLE,FIRSTV, .center;DELTAV,TICSPC,IPOWER,NUMDIG,LABTIC) .blank.center;************************************** .autotable .left margin 20.paragraph -15,1 (X0,Y0)#(input parameter) is the coordinate position, in inches, of the starting point for the axis. The axes ends should be at least 0.5 inches from the current window limits to allow space for the scale annotation and the title. When the coordinate system is being generated to coincide with a plot produced by subroutine LINE the X0 value for the X axis must be 0.0 and the Y0 value for the Y axis must be 0.0. ITITLE##(input parameter) is the title for the axis. This title is centered and placed parallel to the axis line. ITITLE may be either a Hollerith literal, or an array with five left-justified characters per word. The output title has a fixed height of 0.15 inch. NCHR####(input parameter) specifies the number of characters in the title and on which side of the axis the labeling information will be written. .paragraph -9,0 (NCHR > 0) make the 'tick' mark, annotation, and title placement on the counterclockwise side of the axis relative to the line projected from the origin along the desired axis. This condition is normally desired for the Y-axis. (NCHR = 0) make the 'tick' mark and annotation placement on the counter-clockwise side of the axis relative to the line projected from the origin along the desired axis. There is no title on this axis. (NCHR _< 0) make the 'tick' mark, annotation, and title placement on the clockwise side of the axis relative to the line projected from the origin along the desired axis. This condition is normally desired for the X-axis. .paragraph -15,1 AXSLEN##(input parameter) is the length, in inches, of the axis line. ANGLE###(input parameter) is the angle, in degrees, at which the axis is to be drawn. Normally this value is 0.0 for the X-axis and 90.0 for the Y-axis. FIRSTV##(input parameter) is the starting value which will appear on the first 'tick' mark of the axis. This value, if computed by SCALE will be stored at location ARRAY(NPT+1). DELTAV##(input parameter) is the number of data units per inch of axis. This value, if computed by SCALE, will be stored at ARRAY(NPT+2). TICSPC##(input parameter) is the distance between 'tick' marks, in inches. IPOWER##(input parameter) is the exponent times 10, (*10**IPOWER), used in the title. NUMDIG##(input parameter) is the number of decimal places wanted in the annotation on each labeled 'tick' mark. If integers are wanted NUMDIG should be set equal to -1. If no numbers are wanted NUMDIG should be set equal to 999. .index 999 ><AXES LABTIC##(input parameter) is the delta value for labeling the 'tick' marks. For example, if LABTIC = 3 every third 'tick' mark will be labeled. If LABTIC is less than 1 no labeling will be done. .autoparagraph .left margin 5.paragraph 5,1 .note Each call to AXES will draw a single axis with labels. It requires two calls to AXES to create an (X,Y) coordinate system. .end note .;End of AXES.RNO .;Start of AXIS.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 2 ^&Subroutine 'AXIS'\& .index <AXIS .index Subroutine ><AXIS AXIS provides the user with the capability of generating and labeling an axis by drawing a line of arbitrary length divided into one inch segments by 'tick' marks. The variable value is written as an annotation beside each mark. The axis can also be labeled if the user desires. .blank.center;********** calling sequence ********** .blank.center;CALL AXIS (X0,Y0,ITITLE,NCHR,AXSLEN, .center;ANGLE,FIRSTV,DELTAV) .blank.center;************************************** .autotable .left margin 20.paragraph -15,1 (X0,Y0)#(input parameter) is the coordinate position, in inches, of the starting point for the axis. The axes ends should be at least 0.5 inchs from the current window limits to allow space for the scale annotation and the title. When the coordinate system is being generated to coincide with a plot produced by subroutine LINE the X0 value for the X axis must be 0.0 and the Y0 value for the Y axis must be 0.0. ITITLE##(input parameter) is the title for the axis. This title is centered and placed parallel to the axis line. ITITLE may be either a Hollerith literal, or an array containing five left-justified characters per word. The title has a fixed height of 0.15 inch. NCHR####(input parameter) specifies the number of characters in the title and on which side of the axis the labeling information will be written. .paragraph -9,0 (NCHR > 0) make the 'tick' mark, annotation, and title placement on the counterclockwise side of the axis relative to the line projected from the origin along the desired axis. This condition is normally desired for the Y-axis. (NCHR = 0) make the 'tick' mark and annotation placement on the counter-clockwise side of the axis relative to the line projected from the origin along the desired axis. There is no title on this axis. (NCHR _< 0) make the 'tick' mark, annotation, and title placement on the clockwise side of the axis relative to the line projected from the origin along the desired axis. This condition is normally desired for the X-axis. .paragraph -15,1 AXSLEN##(input parameter) is the length, in inches, of the axis line. ANGLE###(input parameter) is the angle, in degrees, at which the axis is to be drawn. Normally this value is 0.0 for the X-axis and 90.0 for the Y-axis. FIRSTV##(input parameter) is the starting value which will appear on the first 'tick' mark of the axis. This value, if computed by SCALE will be stored at location ARRAY(NPT+1). Only two decimal places will be on the annotations. DELTAV##(input parameter) is the number of data units per inch of axis. This value which is added to FIRSTV for each succeeding 1 inch division along the axis, if computed by SCALE, will be stored at ARRAY(NPT+2). .autoparagraph .left margin 5.paragraph 5,1 .note Each call to AXIS will draw a single axis line and label it. The creation of an (X,Y) coordinate system is accomplished by two references to the subroutine AXIS. .end note .;End of AXIS.RNO .;Start of DASHLN.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 2 ^&Subroutine 'DASHLN'\& .index <DASHLN .index Subroutine ><DASHLN DASHLN is used to draw either a solid or dashed line between two points. .blank.center;********** calling sequence ********** .blank.center;CALL DASHLN (X0,Y0,XN,YN,DASH) .blank.center;************************************** .autotable .left margin 20.paragraph -15,1 (X0,Y0)#(input parameter) is the coordinate, in inches, of the starting end of the line segment. (XN,YN)#(input parameter) is the coordinate, in inches, of the terminating end of the line segment. DASH####(input parameter) is a flag to tell whether a solid or dashed line segment is desired. .paragraph -9,0 (DASH _<= 0) makes the line segment solid. (DASH > 0) makes the line segment dashed. DASH is the length, in inches. .autoparagraph .left margin 5.paragraph 5,1 .note The first and last segments of the line are always drawn with the pen down - this is so that the ends of the line are clearly marked. The length of DASH should be much smaller than the distance between (X0,Y0) and (XN,YN). .end note .;End of DASHLN.RNO .;Start of GRID.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 2 ^&Subroutine 'GRID'\& .index <GRID .index Subroutine ><GRID GRID draws a linear grid. .blank.center;********** calling sequence ********** .blank.center;CALL GRID (X0,Y0,DELX,DELY,NXSP,NYSP) .blank.center;************************************** .autotable .left margin 20.paragraph -15,1 (X0,Y0)#(input parameter) is the coordinate, in inches, of the lower left hand corner of the grid. DELX####(input parameter) is the distance, in inches, between the grid lines in the X direction. DELY####(input parameter) is the distance, in inches, between the grid lines in the Y direction. NXSP####(input parameter) is the number of grids in the X direction. NYSP####(input parameter) is the number of grids in the Y direction. .autoparagraph .left margin 5.paragraph 5,1 .note GRID will generate a linear grid of any size. The number of lines drawn is NXSP + 1 in the X direction (vertical lines) and NYSP + 1 in the Y direction (horizontal lines). .end note .;End of GRID.RNO .;Start of LINE.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 2 ^&Subroutine 'LINE'\& .index <LINE .index Subroutine ><LINE LINE enables a user to plot (X,Y) pairs of data values from an X array and a Y array. LINE computes the position on the page of each plotted point from the data values and scaling parameters in the two arrays. The data points may be represented by centered symbols with or without connecting lines. The connecting lines may be solid or dashed. The scaling parameters, FIRSTV and DELTAV, as detailed in .index <SCALE ><FIRSTV .index <SCALE ><DELTAV subroutine SCALE, must be found in the last two locations of each array. These values, if not computed by subroutine SCALE, must be supplied by the user. .blank.center;********** calling sequence ********** .blank.center;CALL LINE (XARRAY,YARRAY,NPNTS,ILINE,ISYSB,DASH) .blank.center;************************************** .autotable .left margin 20.paragraph -15,1 XARRAY##(input parameter) is the name of the one dimensional array containing the X (abscissa) values along with the scaling values for this array. YARRAY##(input parameter) is the name of the one dimensional array containing the Y (ordinate) values along with the scaling values for this array. NPNTS###(input parameter) is the number of data points in the XARRAY and YARRAY. Note: The number of points in both arrays must be the same. This number does not include the two extra locations required for scaling parameters. ILINE###(input parameter) is a flag used to describe the type of line to be drawn through the data points. .paragraph -9,0 (ILINE = 0) points are connected by straight lines, no centered symbols are plotted. (ILINE > 0) points are connected by straight lines and a centered symbol is drawn at each point. (ILINE _< 0) centered symbols are plotted at each point without connecting lines. .paragraph -15,1 ISYMB###(input parameter) is the integer equivalent of the desired centered symbol. DASH####(input parameter) is a flag to tell whether the connecting lines are solid or dashed. .paragraph -9,0 (DASH <= 0) make the connecting lines solid. (DASH > 0) make the connecting lines dashed. DASH is the length, in inches. .autoparagraph .left margin 5.paragraph 5,1 .note For the dashes to show up, the length of the dashes must be much smaller than the distance between consecutive points. Subroutine LINE should not be used to plot a large number of points close together. .end note .;End of LINE.RNO .;Start of LOGAX.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 2 ^&Subroutine 'LOGAX'\& .index <LOGAX .index Subroutine ><LOGAX LOGAX is used to draw a logarithmic axis with any number of cycles. Each cycle is labelled. .blank.center;********** calling sequence ********** .blank.center;CALL LOGAX (X0,Y0,NCHR,ITITLE,ANGLE,AXSLEN,NCYC,IEXP) .blank.center;************************************** .autotable .left margin 20.paragraph -15,1 (X0,Y0)#(input parameter) is the coordinate position, in inches, of the starting point for the axis. NCHR####(input parameter) specifies the number of characters in the title and on which side of the axis the labeling information will be written. .paragraph -9,0 (NCHR > 0) make the 'tick' mark, annotation, and header placement on the counterclockwise side of the axis. This condition is normally desired for the Y-axis. (NCHR = 0) make the 'tick' mark and annotation placement on the counter-clockwise side of the axis. There is no header on this axis. (NCHR _< 0) make the 'tick' mark, annotation, and header placement on the clockwise side of the axis. This condition is normally desired for the X-axis. .paragraph -15,1 ITITLE##(input parameter) is the title for the axis. This title is centered and placed parallel to the axis line. ITITLE is either a Hollerith literal, or an array containing five left justified characters per word. The title has a fixed height of 0.15 inch. ANGLE###(input parameter) is the angle, in degrees, at which the axis is to be drawn. Normally this value is 0.0 for the X-axis and 90.0 for the Y-axis. AXSLEN##(input parameter) is the length, in inches, of the axis line. NCYC####(input parameter) is the number of logarithmic cycles wanted. IEXP####(input parameter) is the lower exponent limit for the axis. The base of the first cycle is labeled with 10**IEXP. .autoparagraph .left margin 5.paragraph 5,1 .note The creation of an (X,Y) coordinate system is accomplished by two references to subroutine LOGAX. .end note .;End of LOGAX.RNO .;Start of LOGAXS.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 2 ^&Subroutine 'LOGAXS'\& .index <LOGAXS .index Subroutine ><LOGAXS LOGAXS is used to draw a logarithmic axis with any number of cycles, with only some of the cycles labelled. .blank.center;********** calling sequence ********** .blank.center;CALL LOGAXS (X0,Y0,NCHR,ITITLE,ANGLE,AXSLEN, .center;NCYC,IEXP,LABTIC) .blank.center;************************************** .autotable .left margin 20.paragraph -15,1 (X0,Y0)#(input parameters) is the coordinate position, in inches, of the starting point for the axis. NCHR####(input parameter) specifies the number of characters in the title and on which side of the axis the labeling information will be written. .paragraph -9,0 (NCHR > 0) make the 'tick' mark, annotation, and title placement on the counterclockwise side of the axis. This condition is normally desired for the Y-axis. (NCHR = 0) make the 'tick' mark and annotation placement on the counter-clockwise side of the axis. There is no title on this axis. (NCHR _< 0) make the 'tick' mark, annotation, and title placement on the clockwise side of the axis. This condition is normally desired for the X-axis. .paragraph -15,1 ITITLE##(input parameter) is the title for the axis. This title is centered and placed parallel to the axis line. ITITLE is either a Hollerith literal, or an array containing five left-justified characters per word. The title has a fixed height of 0.15 inch. ANGLE###(input parameter) is the angle, in degrees, at which the axis is to be drawn. Normally this value is 0.0 for the X-axis and 90.0 for the Y-axis. AXSLEN##(input parameter) is the length, in inches, of the axis line. NCYC####(input parameter) is the number of logarithmic cycles wanted. IEXP####(input parameter) is the lower exponent limit for the axis. The base of the first cycle is labeled with 10**IEXP. LABTIC##(input parameter) is the labeling interval for the 'tick' marks. For example, if LABTIC = 3, every third 'tick' mark is labeled. If (LABTIC <= 0) no labeling will be done. .autoparagraph .left margin 5.paragraph 5,1 .note The creation of an (X,Y) coordinate system is accomplished by two references to subroutine LOGAXS. .end note .;End of LOGAXS.RNO .;Start of SCALE.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 2 ^&Subroutine 'SCALE'\& .index <SCALE .index Subroutine ><SCALE Subroutine SCALE is used to examine the data values contained in an array to determine: .autotable .left margin 10.paragraph -4,1 1) A starting value, (FIRSTV) which is an adjusted minimum, or maximum value for the array (see NPT). 2) A scaling factor, (DELTAV) which is positive or negative such that: .left margin 15 A) The scale annotation drawn by AXIS on each division 'tick' mark will properly represent the range of real data values in the array. B) The data points, when plotted by LINE will fit within the given plotting area. .autoparagraph .left margin 5.paragraph 5,1 These two values (FIRSTV and DELTAV) .index <SCALE ><FIRSTV .index <SCALE ><DELTAV are computed by SCALE and stored in the two locations at the end of the data array used. The scaling factor (DELTAV) that is computed represents the number of data units per inch of axis, but is adjusted so that it is always an interval of 1, 2, 4, 5, or 8 * 10**N (N is an exponent consistent with the original unadjusted scaling factor). This adjustment insures that the axes can be labeled with integer numbers. The starting value (FIRSTV) which would appear as the first annotation on the axis, is computed as some multiple of DELTAV that is equal to or outside the limits of the data in the array. For example, consider an array having a range of values from 301 to 912 to be plotted over an axis of 10 inches. The unadjusted scaling factor is: .blank.center;(912 - 301.0) / 10.0 = 61.1 units/inch. .blank The adjusted DELTAV would be 80.0 (8#*#10**1). In this example, a FIRSTV of 240.0 would be chosen as the best value if a minimum is returned; 1040.0 would be chosen as the best value for the maximum. In another example, values from -1.0 to +1.0 are to be plotted over a 5 inch axis. .blank.center;(+1.0 - (-1.0)) / 5.0 = 0.4 units/inch .blank DELTAV = 4#*#10**-1, FIRSTV = -1.2 for a minimum, or +1.2 for a maximum. Note that 5 inches from -1.2 is +0.8, although the data goes to +1.0, which is past the top of the axis. .test page 20 .blank.center;********** calling sequence ********** .blank.center;CALL SCALE (ARRAY,AXSLEN,NPT) .blank.center;************************************** .autotable .left margin 20.paragraph -15,1 ARRAY###(input parameter) is the array of data points to be examined. .note This array must be dimensioned for at least two more elements than the number of values being scanned to allow SCALE to store the computed starting value and the scaling factor at the end of the array. .end note AXSLEN##(input parameter) is the length of the axis, in inches, to which the data is to be scaled. It's value must be greater than 1. If the value given is not a whole number, the value given will be rounded to the next lowest whole number and this value will be used for calculations. NPT#####(input parameter) is the number of data values to be scanned within the array. .paragraph -9,0 (NPT > 0) return FIRSTV as the minimum value. (NPT _< 0) return FIRSTV as the maximum value, and use the absolute value of NPT as the number of data points. .paragraph -15,1 FIRSTV is returned to the user in ARRAY(NPT+1) .blank DELTAV is returned to the user in ARRAY(NPT+2). .autoparagraph .left margin 5.paragraph 5,1 Generally, subroutine SCALE is referenced to examine each array to be plotted. if the user knows the range of his data values, he doesn't have to reference SCALE for the array as long as he supplies an appropriate FIRSTV and DELTAV when the axes subroutines and subroutine LINE are called. .note Unlike the other routines in described in this chapter, subroutine SCALE does not do any plotting. .end note .;End of SCALE.RNO .;Start of LABEL.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .title Labeling Routines .test page 30 .indent -5.hl 1 ^&LABELING ROUTINES\& .index Software >Labeling routines The routines used to label plots allow the user full freedom of choice on symbol placement, size and orientation, as well as a fairly full selection of alphabet styles for the characters. The symbol sets available to the user can be changed with the SETSYM routine. See the description of SETSYM for a list of character tables. .index <SETSYM Examples of the character sets is plotted in the appendix. The basic routine for symbol generation is SYMBOL, which actually makes the calls to PLOT that define the pen strokes for the desired character. The routine NUMBER is a routine that is designed to make the generation of numeric labels convenient. Careful use of the labeling routines will enhance the plot by attractively calling attention to the labeled features for easy identification. These routines are the included in FORLIB, the FORTRAN library. Unlike the CALCNT and PLOT3D routines, FORLIB routines get loaded automatically whenever they are needed. .skip 3 The Labelling Routines are: .list .le;NUMBER - Draw a floating-point number. .le;SETSYM - Select a symbol set. .le;SYMBOL - Draw text on the plot. .end list .;End of LABEL.RNO .;Start of NUMBER.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 2 ^&Subroutine 'NUMBER'\& .index <NUMBER .index Subroutine ><NUMBER Subroutine NUMBER will draw a floating-point number on the plotter. This routine converts the number to a string of digits and then calls subroutine SYMBOL. .index <SYMBOL .blank.center;********** calling sequence ********** .blank.center;CALL NUMBER (X0,X0,HEIGHT,FNUM,ANGLE,NDIG,IRAD) .blank.center;************************************** .autotable .left margin 20.paragraph -15,1 (X0,Y0)#(input parameters) is the coordinate, in inches, of the lower left hand corner of the first character to be drawn (before rotation). The value of 999.0 for X0 or Y0 means to not change the appropriate pen coordinate. .index 999 ><NUMBER HEIGHT##(input parameter) is the height, in inches, of the digits to be drawn. FNUM####(input parameter) is the floating-point number that is to be converted and plotted. ANGLE###(input parameter) is the angle, in degrees, at which the number is to be plotted. NDIG####(input parameter) controls the number of digits plotted. .paragraph -9,0 (NDIG > 0) the number of digits to the right of the decimal point that are to be plotted. If NDIG is greater than eight, only eight digits will be plotted. (NDIG = 0) only the integer portion of the number and the decimal point will be plotted. (NDIG = -1) only the integer portion of the number will be plotted. (NDIG < -1) the absolute value of NDIG - 1 digits will be truncated from the integer portion before plotting. .paragraph -15,1 IRAD####(input parameter) is an optional argument. This argument allows the user to specify the output radix of the number. If IRAD equals eight the number will be plotted in octal, etc. .autoparagraph .left margin 5.paragraph 5,1 .blank.center;^&Example\& .blank .literal PI = 3.14159 CALL NUMBER (999.0, 999.0, 0.1, PI, 90.0, 2) CC That drew '3.14' at 90 degrees, at the last CC pen position .end literal .;End of NUMBER.RNO .;Start of SETSYM.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 2 ^&Subroutine 'SETSYM'\& .index <SETSYM .index Subroutine ><SETSYM The SETSYM routine changes the character set used by the SYMBOL routine. The system character sets are stored in SYS:SYMBOL.DAT[1,4], users may use a private set if they define the logical device name SYMBOL:. .blank.center;********** calling sequence ********** .blank .center;CALL SETSYM(IFUNC,IARG,IANS) .blank .center;or .blank .center;CALL SETSYM('WIDTH',LETTER,WIDTH) .blank.center;************************************** .autotable .left margin 20.paragraph -15,1 IFUNC###(input parameter) is the function to perform. IARG####(input parameter) is the argument for the function. IANS####(output parameter) is the returned value. .paragraph -15,0 .skip 2 (IFUNC = 'TABLE') change the character set table. If IARG is positive, read that table from SYS:SYMBOL.DAT[1,4] (like the old ISETAB function). If IARG is negative, read that table from SYMBOL:SYMBOL.DAT[-] (like the old MSETAB function). #####IARG = (input parameter) The table to read. #####IANS = (output parameter) The error flag. 0 means table set up, -1 means an error was encountered. .skip (IFUNC = 'QUERY') read the number of the current table and return it in IANS. #####IARG = (ignored) #####IANS = (output parameter) The current table number. .skip (IFUNE = 'WIDTH') read the width of the character as compared to the height. #####IARG = (input parameter) Either a single character between quotes, or an integer with the ASCII code of the character. #####WIDTH = (output parameter) The ratio of width to height, usually in the neighborhood of 0.67, and returned as 0.0 if no such character. .autoparagraph .left margin 5.paragraph 5,1 .skip 4.test page 15 .center;^&Symbol#Tables\& .index Symbol sets >available .blank .no fill.list Table Upper Lower Numbers Punctu- Case Case ation .skip 1##CSM#Standard yes yes yes yes 2##CSM#secondary yes no yes yes 3##Olde#English yes yes yes yes 4##Old#German yes yes no no 5##Old#Italian yes yes no no 6##Script yes yes no no 7##Simplex#Roman yes yes yes yes 8##Simplex#Italics yes yes yes yes 9##Triplex#Roman yes yes yes yes 10#Triplex#Italics yes yes yes yes 11#Hershey's letters yes yes yes yes 12#Simplex#Greek yes yes no no 13#Duplex#Greek yes yes no no .end list .fill The CSM software retains only one symbol table at any given time; it contains the description of alphabetic and numeric symbols, and SETSYM table _#1 contains a set of centered symbols for marking points. .test page 25 There are 26 centered symbols in the CSM standard symbol table (SETSYM table number 1). The exact same centered symbols appear in the CSM secondary table (SETSYM table number 2). These symbols are: .blank .test page 16 .center;^&Centered Symbols\& .index Centered symbols .index Symbol sets >Centered symbols .blank .no fill.left margin 10 0 Square box 13 Vertical bar 1 Circle 14 Five pointed star 2 Triangle 15 Horizontal bar 3 Plus sign 16 Digit '0' 4 X 17 Digit '1' 5 Diamond 18 Digit '2' 6 Up arrow 19 Digit '3' 7 X with top bar 20 Digit '4' 8 Z 21 Digit '5' 9 Y 22 Digit '6' 10 Square Star 23 Digit '7' 11 Asterisk 24 Digit '8' 12 Hourglass 25 Digit '9' .fill.left margin 5 .;End of SETSYM.RNO .;Start of SYMBOL.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 2 ^&Subroutine 'SYMBOL'\& .index <SYMBOL .index Subroutine ><SYMBOL The SYMBOL subroutine draws alpha-numeric strings or centered symbols of any height (minimum = 0.02 inches) at any angle. There are 3 modes of operation for this routine: Mode 1: Draw text for titles and captions (NCHR > 0). Mode 2: Draw a single character or symbol (NCHR = 0). Mode 3: Draw a single centered symbol (NCHR _< 0). .blank.center;********** calling sequence ********** .blank.center;CALL SYMBOL (X0,Y0,HEIGHT,ICHARS,ANGLE,NCHR) .blank.center;************************************** .blank .test page 10 ^&Modes 1 and 2:\& .autotable .left margin 20.paragraph -15,1 (X0,Y0)#(input parameter) is the coordinate, in inches, of the lower left hand corner of the first character to be drawn, before rotation by ANGLE. The pen is up while moving to this point. If X0 and/or Y0 are set to 999.0, the next symbol will be drawn as a continuation of the .index 999 ><SYMBOL text previously drawn (the pen will not be repositioned from its current position at the end of the text). HEIGHT##(input parameter) is the height, in inches, of the character(s) to be drawn. For symbol library character set 1 the width/height is 8/8, this includes the spacing. For example, a string of 16 characters 0.15 inches high will be 2.40 inches wide. This is not true for other symbol sets. ICHARS##(input parameter) is the text to be drawn. .paragraph -9,0 (for mode 1) ICHARS is either a literal enclosed by apostrophes, or an array containing five left-justified characters per element. (for mode 2) ICHARS(1) is the number of the desired character. ICHARS may be an array or an undimensioned variable. .paragraph -15,1 ANGLE###(input parameter) is the angle in degrees at which the text is to be plotted. NCHR####(input parameter) the mode of operation. .paragraph -9,0 (NCHR > 0) is the number of characters to be plotted from the ICHARS array (Mode 1). (NCHR = 0) indicates that 1 character, as shown in ICHARS, is to be plotted (Mode 2). .skip 2.test page 20 .paragraph -15,1 ^&Mode 3:\& (X0,Y0)#(input parameter) is the coordinate, in inches, of the center of the centered symbol. The pen is returned to this point after the special character is drawn. HEIGHT##(input parameter) is the height and width of the desired symbol. ICHARS##(input parameter) is the integer equivalent of the desired symbol, ICHARS(1) equals the value of the integer equivalent. ICHARS may be an array or an undimensioned variable. ANGLE###(input parameter) is the angle in degrees at which the symbol is to be plotted. NCHR####(input parameter) is negative and determines whether the pen is up or down during the move to (X0,Y0). .paragraph -9,0 (NCHR = -1) the pen is up during the move to (X0,Y0). (NCHR = -2) the pen is down during the move to (X0,Y0). .autoparagraph .left margin 5.paragraph 5,1 .note The text symbols (in CSM library symbol table 1) are generated on an 8 by 8 point (X,Y) grid with the starting point at the lower left corner, and finish point at the lower right corner. The special characters are generated on a 5 by 5 point grid with the starting and finishing points at the center. The coordinates (Xn,Yn) of the lower left hand corner of the Nth character to be plotted are given by: .blank.center;Xn = X0 + (N-1) * HEIGHT * COS(ANGLE) .center;Yn = Y0 + (N-1) * HEIGHT * SIN(ANGLE) .end note .;End of SYMBOL.RNO .;Start of OBSOL.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .title Obsolete Functions .test page 30 .test page 5.indent -5.hl 1 OBSOLETE FUNCTIONS .index Obsolete functions The following FUNCTION subprograms are obsolete: .list .le;IPLOT##- Replaced by subroutine PLOTS. .le;ISETAB#- Replaced by subroutine SETSYM. .le;MSETAB#- Replaced by subroutine SETSYM. .end list .;End of OBSOL.RNO .;Start of IPLOT.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30.indent -5.hl 2 ^&Function 'IPLOT'\& .index <IPLOT .index Subroutine ><IPLOT This routine is obsolete. Subroutine PLOTS should be used to initiate the plot. The change was made to be compatible with DEC-supplied plotting routines, and to allow the plotter type to be explicitly specified. As an interim measure, a dummy IPLOT routine is provided. It does the following: .literal FUNCTION IPLOT(IWARN) IPLT = 0 !Zero means default plotter IERR = IWARN !Number of messages to trace CALL PLOTS(IPLT,IERR) !Call the right routine IPLOT = IERR !Zero means OK RETURN END .end literal .note Subroutine IPLOT will eventually go away. All programs that use IPLOT should be modified to use PLOTS instead. .end note .;End of IPLOT.RNO .;Start of ISETAB.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 23.indent -5.hl 2 ^&Function 'ISETAB'\& .index <ISETAB .index Subroutine ><ISETAB This routine has been replaced. Subroutine SETSYM should be used to change the data table for subroutine SYMBOL. As an interim measure, a dummy ISETAB routine is provided. It does the following: .literal FUNCTION ISETAB(ITABLE) CALL SETSYM('TABLE',ITABLE,IERR) !Call the right routine ISETAB = IERR !Zero means OK RETURN END .end literal .note Subroutine ISETAB will eventually go away. All programs that use ISETAB should be modified to use SETSYM instead. .end note .;End of ISETAB.RNO .;Start of MSETAB.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 23.indent -5.hl 2 ^&Function 'MSETAB'\& .index <MSETAB .index Subroutine ><MSETAB This routine has been replaced. Subroutine SETSYM should be used to change the data table for subroutine SYMBOL. As an interim measure, a dummy MSETAB routine is provided. It does the following: .literal FUNCTION MSETAB(ITABLE) CALL SETSYM('TABLE',-ITABLE,IERR) !Call right routine MSETAB = IERR !Zero means OK RETURN END .end literal .note Subroutine MSETAB will eventually go away. Any programs that use MSETAB should be modified to use SETSYM instead. .end note .;End of MSETAB.RNO .;Start of CONTUR.RNO .chapter Contouring and 3-D Routines .left margin 5.right margin 64.spacing 1.autoparagraph .title Contour Map Routines .indent -5.hl 1 ^&CONTOURING ROUTINES\& .index Software >Contouring routines The routines CALCNT, GRIDER, and CALSIZ allow the user to take data that is (X,Y,Z) triples, reduce the data to equally spaced 'grided' data, and plot the information as a contour map of a specified size. The user should be very aware of the fact that the basic (X,Y,Z) data provided to subroutine GRIDER is changed according to internal algorithms to make equally spaced data. It is the gridded data that is plotted, NOT the users original data, and the gridded data may contain 'artifacts'. The artifacts are artificial highs or lows at a points in the gridded data array caused by the algorithm used to make equally spaced data. To use these routines you must include LBY:CALCNT.REL as part of your LOAD or EXECUTE command. For example: .blank .center;&.EXECUTE MYPROG.FOR,LBY:CALCNT.REL .skip 4 The CALCNT contouring routines consist of: .list .le;CALCNT - Draws the contour from equally spaced data .le;CALSIZ - Changes the size of the contour map .le;GRIDER - Transforms (X,Y,Z) to equally spaced data .end list .;End of CONTUR.RNO .;Start of CALCNT.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 2 ^&Subroutine 'CALCNT'\& .index <CALCNT .index Subroutine ><CALCNT This program will draw contours on a rectangular area which has been defined by equally spaced data, i.e. gridded data. The size of this area is normally 8 inches by 8 inches, if the X and Y lengths are equal. If they are not equal, the longer side of the rectangle will be 8 inches. The size may be altered by referencing subroutine FACTOR or CALSIZ. Subroutine FACTOR will scale the entire plot up or down and subroutine CALSIZ will only increase or decrease the map size, the characters in the legend and the contour elevations will stay the same size. .blank.center;********** calling sequence ********** .blank.center;CALL CALCNT (X,Y,GRID,IX,IY,MAXX,MAXY,CLOW,CHIGH, .center;CINT,NELEV,LOWHI) .blank.center;************************************** .blank.left margin 14 .blank.indent -9 (X,Y)###(input parameter) is the coordinate, in inches, of the lower left hand corner of the contour map. Allow about .26 inches at the bottom of the map if the legend is wanted. Allow about one (1) inch on each side of the map if the elevations are to be labeled. .blank.indent -9 GRID####(input parameter) is the two dimensional array containing the values to be contoured. The location of a point on the map is defined by the position of a point in the matrix. .blank.indent -9 IX######(input parameter) is the number of contoured grids in the X direction. .blank.indent -9 IY######(input parameter) is the number of contoured grids in the Y direction. .blank.indent -9 MAXX####(input parameter) is the GRID array X dimension. .blank.indent -9 MAXY####(input parameter) is the GRID array Y dimension. .blank.indent -9 CLOW####(input parameter) is the lowest contour value. .blank.indent -9 CHIGH###(input parameter) is the highest contour value. If both CLOW and CHIGH are zero, they will be set to the minimum and maximum of GRID array. .blank.indent -9 CINT####(input parameter) is the contour interval. .left margin 22 .indent -9 (CINT > 0) CINT is the contour interval. .indent -9 (CINT = 0) the contour interval is set equal to (CHIGH - CLOW) / 16. .indent -9 (CINT < 0) the contour interval is set equal to (CHIGH - CLOW) / (-CINT). .blank.left margin 14 .blank.indent -9 NELEV###(input parameter) indicates contour elevations along the right and left hand sides of the map. .left margin 22 .indent -9 (NELEV > 0) the contour level label interval, i.e. if NELEV = 3 label every third contour. .indent -9 (NELEV = 0) do not label any contours. .indent -9 (NELEV < 0) do not label contours or draw a perimeter. .blank.left margin 14 .blank.indent -9 LOWHI###(input parameter) indicates lows and highs. .left margin 22 .indent -9 (LOWHI <= 0) do not mark the lows and highs. .indent -9 (LOWHI > 0) mark the lows and highs. The lows are marked with an 'L' and the highs are marked with an 'H'. .left margin 5.note The legend and the perimeter around the map are drawn using the blue pen, every fifth (5th) contour is drawn in black, and the lows and highs are drawn in red. .end note .;End of CALCNT.RNO .;Start of CALSIZ.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 2 ^&Subroutine 'CALSIZ'\& .index <CALSIZ .index Subroutine ><CALSIZ CALSIZ allows the user to change the size of the contour map to be plotted. CALSIZ is used with subroutine CALCNT. .blank.center;******** calling sequence ********** .blank.center;CALL CALSIZ (X,Y) .blank.center;************************************ .left margin 14 .blank.indent -9 X#######(input parameter) is the maximum X direction size allowed for the map, in inches. .blank.indent -9 Y#######(input parameter) is the maximum Y direction size allowed for the map, in inches. .left margin 5.note This routine will NOT cause the contour map to be expanded in one direction only. The grid will remain square, and the map will be uniformly reduced to fit the most demanding dimension. When using this routine allow about an inch on both sides of the map in the X direction for the contour elevation label. .end note .;End of CALSIZ.RNO .;Start of GRIDER.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 2 ^&Subroutine 'GRIDER'\& .index GRIDER .index Subroutine ><GRIDER GRIDER allows the user to grid irregularly spaced three-dimensional data into equally spaced gridded data. A weighted moving average technique is used to grid the data. .blank.center;********** calling sequence ********** .blank.center;CALL GRIDER (N,X,Y,Z,GRDSIZ,IX,IY,ZZ,NX,NY, .center;MXMN,XMAX,XMIN,YMAX,YMIN,ZMAX,ZMIN) .blank.center;************************************** .left margin 14 .blank.indent -9 N#######(input parameter) is the number of (X,Y,Z) three-dimensional data sets to be gridded. .blank.indent -9 (X,Y,Z)#(input parameters) are the coordinates of the irregularly spaced three-dimensional data to be gridded. .left margin 22 .indent -9 (X) is an array that contains the X values. .indent -9 (Y) is an array that contains the Y values. .indent -9 (Z) is an array that contains the Z values. .left margin 14 .blank.indent -9 GRDSIZ##(input parameter) is the desired length of each square in the grid. If GRDSIZ is less that or equal to zero GRIDER will calculate the best grid size from the input data. .indent -1 (output parameter) is the length of the each square in the grid. Warning - GRDSIZ may be changed by subroutine GRIDER. .blank.indent -9 IX######(input parameter) is the number of grid lines wanted in the X direction. If IX is less than two (2) GRIDER will calculate the best IX from the input data. .indent -1 (output parameter) is the number of grid lines used in the X direction. Warning - IX may be changed by subroutine GRIDER. .blank.indent -9 IY######(input parameter) is the number of grid lines wanted in the Y direction. If IY is less than two (2) GRIDER will calculate the best IY from the input data. .indent -1 (output parameter) is the number of grid lines used in the Y direction. Warning - IY may be changed by subroutine GRIDER. .blank.indent -9 ZZ######(output parameter) is the two-dimensional array that contains the gridded data. .blank.indent -9 NX######(input parameter) is the X dimension of the ZZ array. NX is the maximum value allowed for IX. .blank.indent -9 NY######(input parameter) is the Y dimension of the ZZ array. NY is the maximum value allowed for IY. .blank.indent -9 MXMN####(input parameter) is a flag on whether or not to calculate the X and Y maximums and minimums. .left margin 22 .indent -9 (MXMN = 0) calculate XMAX, XMIN, YMAX, and YMIN. .indent -9 (MXMN <> 0) do not calculate XMAX, XMIN, YMAX, and YMIN, use what the user sends. .left margin 14 .blank.indent -9 XMAX####(input parameter) is the maximum X value. .indent -1 (output parameter) is the maximum X value used by subroutine GRIDER. Warning - XMAX may be changed by subroutine GRIDER. .blank.indent -9 XMIN####(input parameter) is the minimum X value. .indent -1 (output parameter) is the minimum X value used by subroutine GRIDER. Warning - XMIN may be changed by subroutine GRIDER. .blank.indent -9 YMAX####(input parameter) is the maximum Y value. .indent -1 (output parameter) is the maximum Y value used by subroutine GRIDER. Warning - YMAX may be changed by subroutine GRIDER. .blank.indent -9 YMIN####(input parameter) is the minimum Y value. .indent -1 (output parameter) is the minimum Y value used by subroutine GRIDER. Warning - YMIN may be changed by subroutine GRIDER. .blank.indent -9 ZMAX####(output parameter) the maximum Z value. .blank.indent -9 ZMIN####(output parameter) the minimum Z value. .skip 2 .note This routine does not do any plotting. .end note .;End of GRIDER.RNO .;Start of 3DPLOT.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .title 3-D Plot Routines .indent -5.hl 1 ^&3-D ROUTINES\& .index Software >3-^D Routines Documentation on SLIC3D, GRID3D, and LOOK3D to be supplied at a later date. .;End of 3DPLOT.RNO .;Start of SETUP.RNO .chapter PROGRAMMING TECHNIQUES .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .title Programming Techniques .indent -5.hl 1 ^&Starting and Stopping Plotting\& .index Programming Techniques .index Plotting >Starting .index Plotting >Stopping .index Programming Techniques >Starting plotting .index Programming Techniques >Stopping plotting .index Starting Plots .index Stopping Plots The graphics software for plotting routines requires a specific sequence of calls to routines in the package in order to properly initialize the plotting package, and also to finish the plot correctly. The subroutine PLOTS is used to set up the plotting package by checking window privileges, getting the initial character set, and gathering identification information for labeling the spooled output. Subroutine PLOTS must be called BEFORE any reference to a routine that tries to plot. Correct termination of a plotting sequence is made by calling PLOT with a third argument of 999. That is: .blank .blank.center; CALL PLOT (X,Y,999) .index ^^PLOT(X,Y,999) .index 999 ><PLOT .blank Failure to properly terminate a plot may cause loss of the plot in handling because the spooling identification label will be missing. Although a plot may be properly initialized, and terminated, it is possible to lose information on a plot due to the window limitations. When the plotting routines are initialized, the origin of the universal plotting window is set to the lower left corner of a default 11 by 11 inch window. This default allows only positive X and Y values to be plotted on the unadjusted window. It is common practice to move the plot origin away from the corner of the plot window to allow a margin to contain title information, axis labels, and other identification. .blank .test page 10.center; ^&Example\& This example properly initializes a plot, resets the origin to allow a margin for notations, changes the default character set (with proper error recovery), and correctly terminates the plot. .literal . . . C C *** START PLOT OUTPUT *** C IERR = 2 !Ask for 2 warnings CALL PLOTS(IERR,0) !Start the plot IF (IERR.NE.0) STOP '?CANNOT OPEN PLOT' C C *** SET ORIGIN TO ALLOW 1 INCH LEFT AND C *** BOTTOM MARGINS WHILE PLOTTING *** C CALL PLOT (1.0, 1.0, -3) . . . C C *** CHANGE TO SYMBOL SET #9 *** C *** CLOSE PLOT AND STOP *** C *** IF ANY PROBLEMS OCCUR *** C CALL SETSYM('TABLE',9,IERR) IF (IERR.EQ.0) GOTO 400 CALL PLOT (X,Y,999) ! Must close plot first !!! STOP '?FAILURE TO GET SYMBOL SET 9' 400 CONTINUE . . . C C *** CLOSE PLOTTING OUTPUT *** C CALL PLOT (X,Y,999) STOP END .end literal .index <PLOT .index <PLOTS .index <SETSYM .index <SYMBOL .;End of SETUP.RNO .;Start of EFFICY.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 1 ^&Debugging Technique\& .index Debugging .index Software >Debugging .index Programming Techniques >Debugging Debugging should be done sequentially. First, be sure that your program is producing the data you wish to plot by using printouts before adding the plotter routines. Second, be sure that you are plotting the curve correctly before adding lots of 'ginger bread' (axis, title, grid, etc.). Third, add the trimmings that produce an impressive plot. .index Common Errors .blank.center; Common Errors There are two common errors that give programmers doing plotting the most trouble. .list .le;Not knowing what data values are being sent to the plotting routines. Many apparent plotting errors are in fact incorrect data values being sent to the plotting routines. Please be sure to print a listing of the data and check it for correctness before sending it to the plotter. .le;Incorrect calling sequence for a given plotting routine. The error may be due to a lack of sufficient arguments for a routine (missing arguments) or arguments of an incorrect type (e.g. the routine needs an integer value, and you have supplied a real variable, or visa-versa). .end list .;End of EFFICY.RNO .;Start of ERRORS.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .title Warning and Error Messages .indent -5.hl 1 ^&Warning and Error Messages\& .index Warning messages .index Error messages .index Software >Warnings .index Software >Error messages .index Plotting >Warnings .index Plotting >Error messages The plotting package will issue warning and error messages for any actions which cause detectable failures of attempts to plot. The warning messages begin with the percent sign (%) to indicate a non-fatal error, and the program will continue. The error messages will begin with a question mark (?), and will be fatal errors, that is, the program execution will be halted. .blank .blank.center;^&Warning Messages\& .left margin 14 .blank.indent -9 %PLTWWE#The window was exceeded .blank A reference to subroutine PLOT exceeded the current window. .blank.center;^&Error Messages (Fatal)\& .blank.indent -9 ?PLTCSP#Please contact the systems programmer. .blank This message means there is an error in the plotting package that can not be self corrected. .;End of ERRORS.RNO .;Start of EXAMPL.RNO .appendix SAMPLE PROGRAMS .left margin 5.right margin 64.spacing 1.autoparagraph .index Sample programs .title Sample Programs This chapter contains an example of a program which plots a function generated in a main program. The subroutine LINPLT is then used to plot this function on a linear-linear plot. The second program is the one used to plot the character sets one through thirteen found at the end of the manual. .test page 30.left margin 5.right margin 64.spacing 1 .autoparagraph .index Example Programs .indent -5.hl 1 ^&Example program _#1\&###LINPLT This program calls a user defined plotting routine called LINPLT. .index <LINPLT X is the arrary of X-values and Y is the array of sinc(X). .blank .index Example programs ><LINPLT .literal DIMENSION X(10000),Y(10000) I=0 DO 100 A=-360,360,.1 I=I+1 Y(I)=SIND(360*A/60)/A/ACOS(-1.)*180/(.5) X(I)=A !generate the (X,Y) pair for SINC function 100 CONTINUE CALL LINPLT(X,Y,I) !calling plotting subroutine STOP END .end literal .skip 3 .test page 10 .literal SUBROUTINE LINPLT(X,Y,N) DIMENSION X(N),Y(N),ITITLE(5) DATA ITITLE/'PLOT OF A SINC FUNCTION'/ IERR=-9 C CALL PLOTS(IERR,'TEK') !direct plotting on TEK CALL PLOTS(IERR,'SPOOL') !spooled output for DP-8 CALL ERASE !erase the screen if on TEK IF(IERR.NE.0)STOP 'PLOT PROBLEM' CALL PLOT(1.0,1.0,-3) IP=NEWPEN(2) CALL FACTOR(0.5) !scale everything down CALL SYMBOL(1.5,4.25,.15,ITITLE,0.0,23) XLEN=9.0 YLEN=4.0 NPT=N-2 CALL SCALE(X,XLEN,NPT) !scaling routine for LINE CALL SCALE(Y,YLEN,NPT) CALL LINE(X,Y,NPT,0,5,0) !connect (X,Y) pairs CALL GRID(0,0,1.,1.,8,4) !put a grid on the plot CALL PAUSEP(45) !pause for 45 sec if on TEK CALL ERASE CALL PLOT(W,V,999) RETURN END .end literal .;End of EXAMPL.RNO .;Start of TABLES.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .skip 5.test page 30 .indent -5.hl 1 ^&Example program _#2\&###SYMBOL tables This is the program used to plot the thirteen symbol tables found at the end of this manual. It makes use of the SYMBOL and SETSYM subroutines. .blank .index Example programs >Symbol table routines .index <NUMBER .index <SYMBOL .index <SETSYM .literal PROGRAM TABLES !Draws the SYMBOL sets for Appendix D DIMENSION TTL1(9),TTL2(7),DATE(3) DATA TTL1/'CHARACTERS AVAILABLE IN SUBROUTINE "SYMBOL"'/ DATA TTL2/'CHARACTER SET IN SETSYM TABLE # '/ DATA DATE /'OCTOBER 1982'/ C Loop through all 13 tables DO 40 ITABLE = 1,13 TYPE 10, ITABLE 10 FORMAT(' Starting SETSYM table #',I2) IERR = 2 !2 error messages CALL PLOTS(IERR,'SPOOL') !Start the plot IF(IERR.NE.0)STOP 'PLOT FAIL' CALL PLOT(0.0,1.0,-3) !Leave room for page numbers CALL FACTOR(0.80) !Reduce size to 5.6 by 8.8 C Draw a box around the plot in blue CALL NEWPEN(1,IERR) !Reset to blue pen CALL PLOT(0.0, 0.0,3) !Lower left corner, pen up CALL PLOT(0.0,11.0,2) !Left edge CALL PLOT(8.5,11.0,2) !Top edge CALL PLOT(8.5, 0.0,2) !Right edge CALL PLOT(0.0, 0.0,2) !Bottom edge C Draw the title using SETSYM table #1 CALL SETSYM('TABLE',1,IERR) !Reset to standard table CALL NEWPEN(2,IERR) !Change to blue pen ATYPE = FLOAT(ITABLE) !NUMBER needs a REAL arg CALL SYMBOL(0.8,10.0,0.15,TTL1,0.0,43) !Plot titles CALL SYMBOL(1.5,9.6,0.15,TTL2,0.0,32) CALL NUMBER(999.0,999.0,0.25,ATYPE,0.0,-1,10) X0 = 1.4 ; Y0 = 8.6 !Origin C Change to new character set ITEMP = ITABLE !Avoid warning from FORTRAN CALL SETSYM('TABLE',ITEMP,IERR) X = 1.5 ; Y = 9.2 ; H = 0.15 CALL SYMBOL(X,Y,H,'ABCDEFGHIJKLMNOPQRSTUVWXYZ',0.0,26) Y = 9.0 CALL SYMBOL(X,Y,H,'abcdefghijklmnopqrstuvwxyz',0.0,26) .end literal .test page 20 .literal C Create 6 columns, octal 40 thru 160 DO 20 ICOL = 2,7 X = X0 + FLOAT(ICOL-2)*1.0 + 0.50 C Do 16 rows in each column DO 20 IROW = 0,15 Y = Y0 - FLOAT(IROW)*0.5 - 0.5 ICHAR = ICOL*16 + IROW CALL SYMBOL(X,Y,0.30,ICHAR,0.0,0) 20 CONTINUE !End of DO IROW and DO ICOL C Go back to standard characters and label each symbol CALL SETSYM('TABLE',1,IERR) IF(IERR.NE.0) STOP 'CANNOT CHANGE BACK TO #1' CALL SYMBOL(3.25,0.2,0.15,DATE,0.0,12) DO 30 ICOL = 2,7 X = X0 + FLOAT(ICOL-2)*1.0 C Label the top of each column CALL SYMBOL(X,Y0,0.06,'DEC OCT SYM',0.0,11) DO 30 IROW = 0,15 Y = Y0 - FLOAT(IROW)*0.5 - 0.5 ICHAR = ICOL*16 + IROW AI = FLOAT(ICHAR) CALL NUMBER(X,Y,0.06,AI,0.0,-1,10) !Decimal X3 = X + 0.24 CALL NUMBER(X3,Y,0.06,AI,0.0,-1,8) !Octal 30 CONTINUE !End of DO IROW and DO ICOL C Finish this plot correctly 40 CALL PLOT(X,Y,999) !End of DO ITABLE=1,13 END .end literal .index Symbol table routines ><NUMBER .index Symbol table routines ><SYMBOL .index Symbol table routines ><SETSYM .;End of TABLES.RNO .;Start of LBY.RNO .appendix LIBRARY PROGRAMS .left margin 5.right margin 64.spacing 1.autoparagraph .title Library Programs This appendix shows sample runs of plotting programs from the System Library. .list .le;EZPLOT#- Draws simple graphs .le;GRAPH##- Does curve approximation (spline fit) .le;SIMPLT#- Rewrite of EZPLOT .le;DRAW###- Interactive drawing for TEK 4012 or GIGI .end list .;End of LBY.RNO .;Start of EZPLOT.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .indent -5.hl 1 EZPLOT .index Library programs ><EZPLOT EZPLOT is the old work horse plotting routine of the CSM library and has been in use for many years. This routine allows the user to view his data in a quick and dirty fashion. The program is quick to use but does lack some of the frills of GRAPH or SIMPLT .blank .literal .RUN LBY:EZPLOT [11:59:05] DO YOU WANT GENERAL INSTRUCTIONS ? *YES DATA INPUT MUST BE REAL AND IN X,Y PAIRS. DATA MAY BE ENTERED FROM A TERMINAL OR READ FROM AN INPUT DATA FILE. YOU WILL BE ASKED TO SPECIFY LABELS FOR THE X AND Y AXES, TO DETERMINE THEIR LENGTHS, AND TO GIVE A TITLE FOR THE PLOT. YOU MUST SPECIFY WHETHER YOU WANT SYMBOLS PLOTTED AT EACH POINT, A CONNECTING LINE DRAWN, OR BOTH. NOTE: THE LINE MAY BE DASHED OR SOLID. YOU WILL BE GIVEN THE OPTION OF A LINEAR-LINEAR, LINEAR-LOG, LOG-LINEAR OR LOG-LOG PLOT. YOU MAY SELECT AUTO SCALING, IN WHICH CASE THE MAX AND MIN VALUES OF THE ARRAY ARE USED FOR SCALING, OR YOU MAY SPECIFY THE UPPER AND LOWER BOUNDS TO BE USED FOR SCALING. IF MORE THAN ONE SET OF DATA WILL BE PLOTTED ON THE SAME AXES, SPECIFY AN UPPER BOUND AND A LOWER BOUND FOR THE FIRST SET OF DATA WHICH WILL ACCOMMODATE THE SUBSEQUENT SETS OF DATA. THE PEN WILL BE BLACK FOR THE FIRST SET OF DATA PLOTTED. YOU HAVE THE OPTION OF CHANGING THE COLOR FOR SUBSEQUENT SETS OF DATA ON THE SAME AXES. TYPE T IF YOU WISH TO TYPE IN DATA TYPE F IF YOU WISH DATA READ FROM A FILE *F WHAT IS THE NAME OF YOUR INPUT FILE ? *FOR10.DAT ENTER FORMAT OF DATA INCLUDING PARENS CANNOT EXCEED 30 CHARACTERS INCLUDING THE PARENS. *(2G) 4 DATA VALUES READ DO YOU WANT THE DATA TYPED ON YOUR TERMINAL ? *NO TYPE THE X-AXIS LABEL,20 CHARACTERS OR LESS *Title of x-axis TYPE THE Y-AXIS LABEL, 20 CHARACTERS OR LESS *Title of y-axis TYPE A TITLE FOR THE GRAPH,20 CHAR OR LESS *Title of plot IF YOU WANT A SYMBOL PLOTTED AT EACH POINT, TYPE -1 IF YOU WANT A LINE DRAWN CONNECTING PTS, TYPE 0 IF YOU WANT BOTH SYMBOLS AND A LINE, TYPE 1 *0 FOR A DASHED LINE, TYPE 1 FOR A SOLID LINE, TYPE 0 *1 FOR LINEAR-LINEAR PLOT, TYPE 1 FOR LINEAR-LOG PLOT, TYPE 2 FOR LOG-LINEAR PLOT, TYPE 3 FOR LOG-LOG PLOT, TYPE 4 *1 THE X AND Y AXES HAVE A MAX OF 9.0 INCHES TYPE THE LENGTH OF THE X AXIS *8 TYPE THE LENGTH OF THE Y AXIS *8 DO YOU WANT AUTOMATIC SCALING, Y OR N ? *Y ARE GRAPH SPECIFICATIONS CORRECT ? IF NOT, PROGRAM ASKS ALL GRAPH SPECS AGAIN. *Y DO YOU WANT ANOTHER SET OF DATA PLOTTED ON THE SAME SET OF AXES ? *N STOP End of Execution .end literal .note The value or characters preceded by * are typed in by the user .end note .;End of EZPLOT.RNO .;Start of GRAPH.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30 .indent -5.hl 1 GRAPH .index Library programs ><GRAPH GRAPH is another library program. .blank .literal .RUN LBY:GRAPH [13:08:02] THIS A FINAL PLOTTING PROGRAM IN WHICH THE USER CAN PRODUCE A FINAL, POLISHED PLOT. THE USER SHOULD THOROUGHLY KNOW HIS DATA BEFORE RUNNING THIS PROGRAM. ENTER PLOT TITLE (--2-- LINES OF 50 CHAR. MAX.) (HIT THE <RETURN> AFTER EACH LINE.) This is the title of the plot, it is 2 lines long. FOR PLOT TITLE TO APPEAR AT TOP --ENTER "T" FOR PLOT TITLE TO APPEAR AT BOTTOM --ENTER "B" T CHOOSE THE TYPE OF GRAPH TO BE PLOTTED. LINEAR-LINEAR GRAPH --ENTER "1" LINEAR-LOG GRAPH --ENTER "2" LOG-LINEAR GRAPH --ENTER "3" LOG-LOG GRAPH --ENTER "4" 1 DO YOU WANT THE X-AXIS TO INTERSECT THE Y-AXIS AT SOME POINT OTHER THAN THE LOWER-LEFT CORNER OF THE GRAPH ? NO THE X-AXIS WILL BE DEALT WITH FIRST. ENTER THE TITLE FOR THE AXIS (50 CHAR. MAX.) This is the X-AXIS ENTER THE LENGTH FOR THE X-AXIS LINE(1" to 10"). 10 ENTER THE START AND END VALUES FOR X-AXIS. (LEFT VALUE , RIGHT VALUE) 0,10 ENTER THE INCREMENT (IN DATA UNITS) BETWEEN LABELED TIC MARKS ALONG THE AXIS. (THESE TICS WILL BE LABELED) 1 HOW MANY INTERMEDIATE DIVISIONS DO YOU WANT BETWEEN THE LABELED TICS? (THESE DIVISIONAL TICS WILL NOT BE LABELED.) 5 IN LABELING THE AXIS, HOW MANY SIG FIGS DO YOU WANT PRINTED PAST THE DECIMAL? (IF DECIMAL POINTS ARE NOT DESIRED--ENTER "-1" ) 1 WAS ALL THE X-AXIS INFORMATION PUT IN CORRECTLY ? Y THE Y-AXIS WILL NOW BE DEALT WITH. ENTER THE TITLE FOR THE AXIS (50 CHAR. MAX.) This is the Y-AXIS ENTER THE LENGTH FOR THE Y-AXIS LINE(1" to 9"). 7 ENTER THE START AND END VALUES FOR Y-AXIS. (BOTTOM VALUE , TOP VALUE) 0,100 ENTER THE INCREMENT (IN DATA UNITS) BETWEEN LABELED TIC MARKS ALONG THE AXIS. (THESE TICS WILL BE LABELED) 10 HOW MANY INTERMEDIATE DIVISIONS DO YOU WANT BETWEEN THE LABELED TICS? (THESE DIVISIONAL TICS WILL NOT BE LABELED.) 5 IN LABELING THE AXIS, HOW MANY SIG FIGS DO YOU WANT PRINTED PAST THE DECIMAL? (IF DECIMAL POINTS ARE NOT DESIRED--ENTER "-1" ) -1 WAS ALL THE Y-AXIS INFORMATION PUT IN CORRECTLY ? Y WHAT PEN COLOR DO YOU WANT FOR BOTH AXES? (BLUE, BLACK, OR RED) BLUE WOULD YOU LIKE A GRID TO BE DRAWN ? NO THE DATA WILL NOW BE DEALT WITH. TO ENTER THE DATA POINTS FROM YOUR TERMINAL--ENTER "T" TO ENTER THE DATA POINTS FROM A DATA FILE --ENTER "F" F WHAT IS THE NAME OF YOUR DATA FILE ? TEST.DAT ENTER THE FORMAT OF YOUR DATA. (INCLUDE PARENTHESIS) (2G) TO PLOT SYMBOLS AT THE DATA POINTS --ENTER "-1" TO PLOT A LINE THROUGH THE DATA POINTS --ENTER "0" TO PLOT BOTH LINE AND SYMBOLS --ENTER "1" TO PLOT A DASHED-LINE --ENTER "2" TO PLOT BOTH DASHED-LINE AND SYMBOLS --ENTER "3" TO PLOT A BEST-FIT-LINE OF THE DATA POINTS--ENTER "4" (POLYNOMIAL REGRESSION) TO PLOT BOTH BEST-FIT-LINE AND SYMBOLS --ENTER "5" 5 CHOOSE THE SYMBOL TO BE PLOTTED: SQUARE --ENTER "0" CIRCLE --ENTER "1" TRIANGLE--ENTER "2" + --ENTER "3" X --ENTER "4" DIAMOND --ENTER "5" * --ENTER "6" LOZENGE --ENTER "10" STAR --ENTER "14" 2 WHAT PEN COLOR DO YOU WANT FOR THE PLOT? BLACK WHAT DEGREE OF POLYNOMIAL WOULD YOU LIKE THE DATA POINTS TO BE FIT TO ? 2 DO YOU WANT THE CURVE-FIT-LINE TO EXTEND TO THE EDGES OF THE GRAPH ? Y THE COEFFICIENTS FOR THE BEST-CURVE-FIT LINE (IN ASCENDING ORDER) ARE: 0.0000000 0.0000001 1.0000000 DO YOU WANT TO PLOT MORE DATA ON THIS GRAPH ? NO A PLOT FILE HAS BEEN CREATED, AND EXISTS NOW ON YOUR AREA. IF YOU ARE LOGGED-IN AT A TEKTRONIX, THE PLOT CAN BE VIEWED BY THE COMMAND: R TEK STOP End of Execution CPU Time: 1.01 Elapsed time: 3:10.63 EXIT .DIRECT *.PLT [13:12:01] QA63NZ PLT 23 <077> 1-Nov-82 DSKA:[11,10] GRAPH .TEK QA63NZ.PLT [13:12:26 (The TEK program shows the plot on the screen) .PLOT *.PLT [13:13:26] [Plotter job GRAPH queued, request #2067, limit 4] .end literal .note Everything that starts on column 1 was typed by the user. .end note .;End of GRAPH.RNO .;Start of SIMPLT.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30.index Library programs ><SIMPLT .indent -5.hl 1 SIMPLT SIMPLT is a newer version of a quick plotting program. The main benifit of this program is that it can be used to make very simple plots or fancy plots. This program also has the advantage of having a cubic spline curve smoothing for the lines connecting the data points. .skip 2 .literal .R LBY:SIMPLT [11:07:59] Welcome to SIMPLT, version 1.17 Do you need instructions? *Y SIMPLT.HLP 13-Dec-80 Some of the features of SIMPLT are: Logarithmic plotting Centered symbols Dashed or solid lines Up to ten sets of data on a single plot Automatic scaling Cubic spline curve smoothing Polynomial regression curve fitting Extensive error checking To use SIMPLT, type: .RUN LBY:SIMPLT Then just answer the questions. Good luck!!! [End of SIMPLT.HLP] For input files, you may type any valid file spec. Default format is (2G). To type data, enter file spec as either 'TTY:' or 'TYPE'. Input file: *{Input the file name} Enter format (include parens): *(2G) EOF reached. read terminates with 4 points read. Would you like to see the data? *N Another set of data? *N [ 1 sets entered] Title of graph: *The desired title for the plot X axis title: *The title of the x-axis X axis length (inches): *8 Is the x axis logarithmic? *N Y axis title: *The title of the y-axis Y axis length (inches): *8 Is the y axis logarithmic? *N Would you like a grid? *Y Line # 1 - What color (blue, black, or red)? *BLACK Centered symbols? *Y Connecting lines? *Y Dashed lines? *Y Plot is finished. Thank you. End of Execution -------------------------------------------------------- OR Centered symbols? *Y Connecting lines? *N Smoothed lines? *N Polynomial regression line? *Y Degree of curve (5 or less, please)? *4 Do you want the regression line to be drawn to the edges of the graph? *Y Plot is finished. Thank you. End of Execution -------------------------------------------------------- OR Centered symbols? *Y Connecting lines? *N Smoothed lines? *Y Dashed lines? *Y Plot is finished. Thank you. End of Execution .end literal .note The responses preceded by an asterisk are typed by the user .end note .;End of SYMPLT.RNO .;Start of DRAW.RNO .left margin 5.right margin 64.spacing 1.autoparagraph .test page 30.index Library programs ><DRAW .indent -5.hl 1 DRAW The DRAW package consists of a series of programs that run interactively on the TEK 4012 or GIGI graphics terminals. The program triggers the crosshairs on the terminal, so that the user can position the crosshairs and type single-letter commands. The manual for the DRAW package is available by .skip # .PRINT MAN:DRAW.MAN .note The DRAW package is suitable for the generation one-shot special plots, and is not recommended for graphing data. .end note .;End of DRAW.RNO .;Start of DOCMEN.RNO .appendix HELP AND DOCUMENTARY FILES ON PLOTTING .left margin 5.right margin 64.spacing 1.autoparagraph .indent -5.hl 1 HELP FILES ON PLOTTING .index Help On the computer in the help files (HLP:) and in the documentary files (DOC:), there is a series of files which can aid a user in writting plotting programs. .list .le;The command ".HELP PLOTS" will type out the general PLOT help file. .index HELP >^^HELP PLOTS .le;The command ".HELP PLOTROUTINES" will type out HLP:PLOTRO.HLP. This help file consists of a list of plot subroutines and their arguments. .index HELP >^^HELP PLOTROUTINES .le;The file DOC:PLOT.DOC documents the differences between the old version 11 routines and the current version 12 routines. .index HELP >^^PLOT.DOC .le;A copy of this manual is stored on MAN:PLOT.MAN, but that copy does not have any of the plots from Appendix D, and is bulky. A better copy of this manual is available from the Dispatcher at the CSM Computing Center, on the Colorado School of Mines campus. .end list .chapter EXAMPLES OF SYMBOL SETS .left margin 5.right margin 64.spacing 1.autoparagraph .title Examples of SYMBOL sets .index SETSYM .index SYMBOL TABLES The following is examples of the thirteen character sets available on the system. These sets may be retrieved by using the SETSYM subroutine. The thirteen character sets are: .skip .list 0 .le;CSM Standard .le;CSM Secondary .le;Olde English .le;Old German .le;Old Italian .le;Script .le;Simplex Roman .le;Simplex Italics .le;Triplex Roman .le;Triplex Italics .le;Hershey's letters .le;Simplex Greek .le;Duplex Greek .end list .page .hl 1 ^&SETSYM table 1\&###CSM Standard .page .hl 1 ^&SETSYM table 2\&###CSM Secondary .page .hl 1 ^&SETSYM table 3\&###Olde English .page .hl 1 ^&SETSYM table 4\&###Old German .page .hl 1 ^&SETSYM table 5\&###Old Italian .page .hl 1 ^&SETSYM table 6\&###Script .page .hl 1 ^&SETSYM table 7\&###Simplex Roman .page .hl 1 ^&SETSYM table 8\&###Simplex Italics .page .hl 1 ^&SETSYM table 9\&###Triplex Roman .page .hl 1 ^&SETSYM table 10\&###Triplex Italics .page .hl 1 ^&SETSYM table 11\&###Hershey's letters .page .hl 1 ^&SETSYM table 12\&###Simplex Greek .page .hl 1 ^&SETSYM table 13\&###Duplex Greek .page .;Start of INDEX.RNO .page .left margin 5.right margin 64.spacing 1 .title INDEX .number index .display number rl .do index Graphics Manual .;End of INDEX.RNO