.DISABLE ESCAPE .require 'ndk' .stc .require "ndk" .stc ^L^P .stc .fg 20 .stc .ps 65,70,4 .stc .display number "-",RL,"-" .stc .flags substitute .stc .lo 1 .stc .lm +15 .stc ^EPRODUCT DESCRIPTION\E .stc .lm -15 .stc .s 7 .stc .c text .stc ^B^&PIE .stc .s .stc ^IA Pie Chart Plotting Program\&\I\B .stc .S 2 .stc ^BFor Murdoch University users .stc of the LSI-11 Micro-computer .stc .s 3 .stc $$date .stc .ecn .stc .pg \B .display number "- ",D," -" .lo 1 .nnm .nah .flags index ` .flags subindex ` .ps 65,70,4 .f .nmpg ^B .hl 1 Summary\B Program PIE processes a data file by grouping values according to a given criteria. Pie can also plot pre-processed data. The end result is one or a series of plotted pie charts. ^B .hl 1 Pre-requisits\B Program PIE uses the IPF plotting software. This will produce an ^BI\Bndependant ^BP\Blot ^BF\Bile that contains binary encoded X and Y coordinates of the bar graph. The IPF file can then be displayed on either of two plotting devices currently supported. These devices are the Tektronix 4006 graphics VDU and the Watanabe range of flat bed plotters (Miplot, Digiplot etc.). ^B .hl 1 Running the Program\B The program is executed by typing : .s;.c PIE [cmdfile] .s The "cmdfile" is an optional parameter. The command file, if it exists, contains all the working information for the PIE program. If "cmdfile" is not given, PIE will request this information interactively from the VDU. If in interactive mode, PIE will ask "Save answers in a file ?". If the answer is "Y" (for Yes), a command file is created as all of the following questions are answered. Reruns can then be made by typing "PIE#cmdfile", without the need to supply answers to the same questions over again. The command file may be EDITED for minor alterations. .S The IPF file produced by PIE can be plotted as follows#: .s;.lm +5 ^&PLOT/M\&IPLOT PIE.IPF On the Wantanabe flat bed. .br ^&PLOT/T\&K4006 PIE.IPF On the Tektronix 4006 VDU .lm +1 .s;.i -6 NOTE:#If wanting a plot on the Tektronix, you must be signed on at that device. .lm -6 ^B .hl 1 Supplying Data\B Data may be supplied either from a disc file or from the VDU. If from the VDU, an "end of file" or last value is recorded by typing "ctrl/Z". Otherwise data can be extracted from existing files in accordance to a ^Irun time format\I statement given during the question/answer session. Multiple passes over the same file (with different format specifier) or different files is possible. .s Data can be in a raw form (unprocessed) or already pie processed. If already processed, the order of values should be the same as the segment names. .pg ^B .hl 1 Question/Answer Session.\B When in interactive mode, the following questions must be answered. .lm +35;.s .i -35 Save#answers#in#a#file#?(Y/N)###->#Answer "Y" if a command file is required for subsequent runs. .i -35 Enter#name#of#save#file#########->#Give the file name. Use a ".CMD" as the file type - e.g. PIE.CMD .i -35 Enter#number#of#plots#(integer)#->#An integer number specifying the number of plots per page. .i -35 Enter#name#of#output#plot#file##->#A file containing the plot is produced. Enter a name (e.g. PIE.IPF). A file type of .IPF is recommended. .i -35 Colour#?#(Y/N)##################->#If the plotter has multi-colour capability, a "Y" answer will user the first three pens. Pen#1 will be the circle, Pen#2 will be the inscription. .i -35 Enter#coords#bottom/left#(X,Y)##->#The X and Y coordinates in centimeters are for the bottom left position of the graph. They must be given as real values (with decimal points). Multiple graphs are separated with different X and Y coodinates. .i -35 Enter#Amplification#Factor######->#This must be a real value (contain a decimal point). An amplification factor of 1.0 produces a 10cm. diameter circle. .i -35 Enter#Piechart#Title#(max#30)###->#Up to 30 characters for the title. .lm -35 Enter#Pie#segment#names#-#one#per line .br finish with a slash .s If data is already processed, answer 0 to .br the following three questions. .lm +35 .s .i -35 Enter#name#of#input#data#file###->#Name of the file or TI: if data is to be entered from the VDU. .i -35 Enter#read#format#(F#type)######->#The format specifier for the data field. Data must be entered as ^&real\&, therefore the specifier should be F or E type. Example (9X,F5.2) skips the first 9 digits and reads five digits of data assuming that two decimal places are given. .i -35 Enter#value#of#first#seg#(real)#->#The starting value of the first bar division as a real number. .i -35 Enter#segment#increment#(real)##->#The value of each pie segment as a real number. .i -35 Number#of#segments#(integer)####->#The number of bars across the graph as an integer number (no decimal point). .lm -35 .pg .c ^BEXAMPLE\B .nf;.s 3 The following dialogue produced the following pie chart. .s 2 ^BPIE\B Save#answers#in#a#file#?(Y/N)###->^BN\B Enter#number#of#plots (integer)#->^B1\B Enter#name#of#output#plot#file##->^BPIE.IPF\B Colour#?#(Y/N)##################->^BN\B Enter#coords#bottom/left#(X,Y)##->^B3.0,3.0\B Enter#Amplification#Factor######->^B1.0\B Enter#Pie#Chart#Title#(max#30)##->^BPOPULATION DISTRIBUTION\B Enter#pie#Segment#names#-#one#per#line Finish#with#a#slash Enter#name#of#input#data#file###->^BPOP.DAT\B Enter#read#format#(F#type)######->^BF3.0\B If data is already processed answer 0 to the following three questions. Enter#value#of#first#bar#(real)#->^B0.\B Enter#bar#increment#(real)######->^B10.\B Enter#number#of#bars#(integer)##->^B7\B ^BPLOT/MIPLOT PIE.IPF\B .pg .c ^BDATA FILE FOR EXAMPLE\B .s 3 10. 12. 53. 34. 54. 3. 2. 26. 61. 74. 80. 22. 6. 45. 32. 43. 58. 75. 23. 32. 41. 14. 33. 36. 41. 32. 23. 14. 37. 42. 51. 62. 75. \L