.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^&BAR .stc .s .stc ^IA Bar Graph 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 BAR processes a data file by grouping values according to a given criteria. The end result is one or a series of plotted bar charts. ^B .hl 1 Pre-requisits\B Program BAR 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 BAR [cmdfile] .s The "cmdfile" is an optional parameter. The command file, if it exists, contains all the working information for the BAR program. If "cmdfile" is not given, BAR will request this information interactively from the VDU. If in interactive mode, BAR 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 "BAR#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 BAR can be plotted as follows#: .s;.lm +5 ^&PLOT/M\&IPLOT BAR.IPF On the Wantanabe flat bed. .br ^&PLOT/T\&K4006 BAR.IPF On the Tektronix 4006 VDU .lm +1 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. .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. BAR.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. BAR.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 axis, Pen#2 will be the inscription and pen#3 will be the bars. .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. X,Y must be greater than 2.0,2.0. .i -35 Enter#Amplification#Factor######->#This must be a real value (contain a decimal point). An amplification factor of 1.0 produces a (10X10)cm plot. .i -35 Enter#Histogram#Title#(max#30)##->#Up to 30 characters for the title. .i -35 Enter#title#for#X#axis##########->#Up to 20 characters for the X-axis title. .i -35 Enter#title#for#Y#axis##########->#Up to 20 characters for the Y-axis title. .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#bar#(real)#->#The starting value of the first bar division as a real number. .i -35 Enter#bar#increment#(real)######->#The size (width) of each bar as a real number. .i -35 Enter#number#of#bars#(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 histogram. .s 2 ^BBAR\B Save#answers#in#a#file#?(Y/N)###->^BN\B Enter#number#of#plots (integer)#->^B1\B Enter#name#of#output#plot#file##->^BBAR.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#Histogram#Title#(max#30)##->^BPOPULATION DISTRIBUTION\B Enter#title#for#X#axis##########->^BAGE\B Enter#title#for#Y#axis##########->^BNO. PEOPLE\B Enter#name#of#input#data#file###->^BPOP.DAT\B Enter#read#format#(F#type)######->^BF3.0\B Enter#value#of#first#bar#(real)#->^B0.\B Enter#bar#increment#(real)######->^B10.\B Enter#number#of#bars#(integer)##->^B10\B ^BPLOT/MIPLOT BAR.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\P