home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / draw / progs / graphdraw / !GraphDraw_!help < prev    next >
Encoding:
Text File  |  1992-03-10  |  18.8 KB  |  535 lines

  1. !GraphDraw, © Chris Johnson, 1990
  2.  
  3. These user notes refer to version 1.07 (March 1992)
  4.  
  5.  
  6. *********************************************************
  7.  
  8. ACKNOWLEDGEMENT
  9.  
  10. THIS PROGRAM WAS COMPILED USING THE DABS PRESS ARCHIMEDES
  11. BASIC COMPILER (ABC)
  12.  
  13. THE CC STYLE BORDERED ICONS ARE ACHIEVED USING THE
  14. INTERFACE MODULE BY SIMON HUNTINGDON
  15.  
  16. THE FONT MENU MODULE IS BY JORIS ROLING
  17.  
  18. *********************************************************
  19.  
  20.  
  21. What this software does
  22. =======================
  23.  
  24. It allows the entry of the x and y values for a number of
  25. data, and the data may then be fit to
  26.  
  27. a. best straight line
  28. b. best parabola
  29. c. a cubic spline curve
  30. d. a polynomial of order up to 6
  31.  
  32. A number of options for obtaining various forms of hard copy
  33. exist (saving as a sprite file, saving as a !Draw file, or
  34. printing via any standard RISC-OS printer driver).
  35.  
  36. Use of !GraphDraw
  37. =================
  38.  
  39. Running the application
  40. -----------------------
  41.  
  42. This software is fully RISC-OS compatible, and is
  43. multi-tasking. It can be run from the desktop in all the
  44. standard ways.
  45.  
  46. NB. The display of the graph uses outline fonts to annotate
  47. the axes etc.. It is therefore necessary for the operating
  48. system to have "seen" the !fonts directory before the
  49. program is run. Otherwise an error message may be generated.
  50. The default font used is Trinity.Medium, since this comes on
  51. the RISC-OS applications disc, and both old and new version
  52. font managers can deal with it (the new outline font manager
  53. will work with the old bitmapped fonts).
  54.  
  55. Double clicking on the !GraphDraw icon in a directory viewer
  56. will install its icon on the icon bar. Clicking 'menu' on
  57. this icon will lead to a menu providing 
  58.  
  59. Info
  60. ....
  61.  
  62. a standard information window with version number
  63.  
  64. Preferences...
  65. ..............
  66.  
  67. Selecting this brings up a dialogue box that 
  68. allows a range of options to be changed, and 
  69. these changes may be made permanent so 
  70. that they become the new defaults when the 
  71. application is subsequently started.
  72.  
  73. The choices should be self explanatory. The 
  74. font name and size can be changed. To 
  75. change the font, simply click on the name 
  76. field, when a menu will open with all the 
  77. installed fonts shown, from which a choice can 
  78. be made. Clicking on either of the size icon 
  79. fields will place the caret ready to enter the 
  80. new size. The type of point symbol (size and 
  81. whether filled) used for the graph can be 
  82. changed by clicking on the appropriate 
  83. buttons. The changes will not come into 
  84. operation until the OK button is pressed. If the 
  85. cancel button (or the window close icon) is 
  86. pressed, the dialogue box is removed from the 
  87. screen, and the original defaults remain in 
  88. effect. The selection can be made the new 
  89. default by clicking on the save icon. (This 
  90. option is NOT available when the application 
  91. is running over econet). Note that the default 
  92. file is saved within the !GraphDraw application, 
  93. therefore, if the application is being run from a 
  94. floppy disc, the filer may request the disc 
  95. containing the !GraphDraw application to be 
  96. inserted in the disc drive.
  97.  
  98. File format
  99. ...........
  100.  
  101. Graphdraw by default assumes that data files to be
  102. loaded are essentially in CSV format. It is
  103. possible to change the data field separator that
  104. graphdraw looks for in input files to TAB, space
  105. or any other ASCII character. When graphdraw saves
  106. a data file it always uses the COMMA as a
  107. separator.
  108.  
  109. Quit
  110. ....
  111.  
  112. the opportunity to quit the application.
  113.  
  114.  
  115. Clicking SELECT on the iconbar icon will open an
  116. empty edit window, into which the pairs of x,y
  117. data may be entered. This version allows a maximum
  118. of 200 data point pairs. Full scrolling and
  119. editing facilities are available during data
  120. entry, by means of the arrow keys, either alone or
  121. in conjunction with SHIFT or CTRL. Page up/down
  122. are the same as SHIFT+arrow. One useful key
  123. combination is CTRL+SHIFT+COPY, which will delete the
  124. data point at the cursor and close up the rest of the
  125. data. The function key f3 will bring up the standard
  126. save as dialogue box (as provided also as a menu
  127. choice). 
  128.  
  129. The application can also be started by double clicking on a
  130. data file of the correct format. In this case, besides the
  131. icon appearing on the icon bar, the edit window will be
  132. opened with the contents of the data file displayed, for
  133. further editing if necessary. A data file may also be
  134. dragged, either into the edit window, or to the iconbar
  135. icon. The data will be loaded, overwriting any data that had
  136. previously been entered.
  137.  
  138. Data can also be passed in either direction between the
  139. GraphDraw edit window and a !edit window. Thus editing can
  140. be carried out using the !edit application if preferred.
  141. Data can be entered 'from scratch' using !edit, and then
  142. transferred to the !GraphDraw application (by dragging a
  143. save icon to its edit window or its iconbar icon), as long
  144. as the !GraphDraw application can recognise a valid data
  145. file. This version of !GraphDraw takes the easy way out and
  146. uses the <wimp$scrap> file passing protocol with a temporary
  147. disc file. Users of single floppy disc machines may be
  148. prompted for the disc on which the <wimp$scrap> file is to
  149. be saved (by default in the !system directory). [HINT: It is
  150. possible to redirect the <wimp$scrap> file to the RAM disc,
  151. for example. This will prevent disc swapping, and is very
  152. fast. It requires that a RAM disc is always configured.] It
  153. is intended that the next version will use direct memory
  154. transfer for these operations. As the graphdraw application
  155. will deal with files of comma separated ASCII data it is
  156. possible to set up other applications to produce data files
  157. of the correct form.
  158.  
  159.  
  160. The !GraphDraw edit window menu
  161. ===============================
  162.  
  163. All of the data processing and data display facilities are
  164. accessed from the edit window menu.
  165.  
  166. Clicking the 'menu' button in the edit window brings up the
  167. following choices.
  168.  
  169. Info
  170. ----
  171. The standard information window.
  172.  
  173. Clear data
  174. ----------
  175. This will irretrievably clear the current data prior to the
  176. entry of new data.
  177.  
  178. Save file
  179. ---------
  180. Data files may be saved by dragging the save icon to a
  181. directory viewer. If the full path name is set up, then you
  182. can also click on the OK icon to save the data.
  183.  
  184. The function key F3 can be used as a short cut for this
  185. option (unless the graph window is open, when F3 will
  186. bring up the "save drawfile" dialogue box).
  187.  
  188. It is also possible to drag the save icon to a !Edit window,
  189. or to the !Edit icon on the iconbar. The data is then
  190. transferred into !Edit.
  191.  
  192. Plot points
  193. -----------
  194. This will simply plot a scaled graph of the data.
  195. Additional sub-menu choices allow you to plot the data
  196. as is, as semi-log x, semi-log y or as a log-log plot.
  197.  
  198. Join points
  199. -----------
  200. This plots the points and joins each point to the next
  201. with a straight line. The log plotting options are
  202. available as above.
  203.  
  204. Best line
  205. ---------
  206. This will carry out a standard linear regression by the
  207. least squares method to calculate the best fit straight line
  208. through the data. A window will open displaying the slope,
  209. intercept on y axis, correlation coefficient and the
  210. standard errors of the slope and intercept. Clicking 'menu'
  211. in this window allows the following choices.
  212.  
  213.    Graph
  214.    -----
  215.    This will display a graph of the data points with the
  216.    calculated best line superimposed. Clicking 'menu' in the
  217.    graph window leads to a further set of options (see below
  218.    under cubic spline).
  219.  
  220.    Print data
  221.    ----------
  222.    This will send the results of the calculation to any
  223.    printer connected to the computer. The individual errors
  224.    calculated for each data point are also printed.
  225.  
  226. Parabola
  227. --------
  228. This will carry out a least squares fit of the data to the
  229. equation of a parabola
  230.  
  231.       y = u + vX + wX^2.
  232.  
  233. This is a useful technique for fitting data to a simple
  234. curve. A window will open showing the calculated values of
  235. the coefficients u, v and w. Clicking 'menu' in this window
  236. will bring up the same two options as described above, i.e.
  237. graph and Print data.
  238.  
  239. Polynomial
  240. ----------
  241. This will carry out a standard polynomial fit for orders 3
  242. to 6. Some of the higher order options may be greyed out if
  243. there are not enough data points. Selecting a particular
  244. order will force the program to calculate that specific
  245. order polynomial, whereas if 'All' is selected, the program
  246. will try all possible orders (3 to 6) and report the one
  247. which gives the smallest deviation. A window will open
  248. showing the results of the calculation, and clicking 'menu'
  249. on this window leads to the same options as above.
  250.  
  251. Cubic spline
  252. ------------
  253.  
  254. This option leads to a small dialogue box, which
  255. at present simply requests the 'fit factor' to be
  256. specified. This value must lie BETWEEN 0 and 1. In
  257. theory, a value of 0 will plot a straight line
  258. through the points, while a value of 1 will force
  259. the curve through every point. In practice these
  260. values cannot be used, since a divide by zero
  261. error is generated during certain matrix inversion
  262. operations. Little is lost since a value of 0.9999
  263. or 0.0001 will give essentially the same result as 1
  264. or 0. Curve fitting is always very subjective, and
  265. it is up to the user to decide what degree of
  266. smoothing is acceptable for any particular set of
  267. data. A value of 0.5 is an obvious starting point
  268. for any data known to have scatter or experimental
  269. error.
  270.  
  271. Once <return> is pressed, the spline plot will be
  272. displayed. For this plot, it requires all the data
  273. to be sorted in order. The program automatically
  274. sorts the data in ascending order of x values
  275. before carrying out the spline routine. Note
  276. that this sorting occurs whenever any of the plotting
  277. routines are used.
  278.  
  279. Transform X
  280. -----------
  281.  
  282. Allows the x data to be transformed in a number of
  283. standard ways, e.g. LOG, reciprocal. These operations
  284. are cumulative, but it is up to the user to remember the
  285. sequence of transformations.
  286.  
  287. Transform Y
  288. -----------
  289.  
  290. As for transform X but on the y data.
  291.  
  292. Swap X and Y
  293. ------------
  294.  
  295. Simply interchanges the x and y data pairs.
  296.  
  297.  
  298. Graph window menus
  299. ==================
  300.  
  301. Whenever a graph is being displayed, clicking 'menu' will
  302. lead to a further range of options. Some of these are common
  303. to all the graph types, others are specific to cubic spline.
  304. Rather than repeat the same thing several times over, all
  305. the common options are dealt with here.
  306.  
  307. The common options
  308. ------------------
  309.  
  310. Screensave
  311. ----------
  312. This saves either the graph window or the whole screen
  313. as a sprite, which can then be loaded into !Paint, or
  314. !Draw for example. The screen can be printed from either
  315. of these utilities using the RISC-OS printer drivers.
  316. There is no choice in filename - it saves in the current
  317. directory using grafwinN, where N is a decimal number
  318. which increments with each save. It defaults to 1 each
  319. time the program is run, thus any existing files from a
  320. previous session will be overwritten if there are any in
  321. the current directory
  322.  
  323. Legend
  324. ------
  325. This opens a window which allows you to enter text to label
  326. the graph axes, and a title string for the graph. Clicking
  327. on display will place the labels on the graph, while delete
  328. will remove labels from the graph (the text remains in
  329. memory and can be reinstated by reselecting label and
  330. clicking on display). Simply closing the menu will leave the
  331. state of the labels as they were.
  332.  
  333. The labels are dragable icons and can thus be dragged to
  334. anywhere on the graph if you dont like the default
  335. positions. The same labels will appear on any graph, with
  336. the previous position being remembered. The y-axis label
  337. may be plotted either horizontally or vertically,
  338. reading downwards. The latter is something I am not too
  339. sure about as far as the aesthetics of display are
  340. concerned. I have not yet worked included routines to
  341. rotate outline font text through 90 degrees so that it
  342. reads up the axis! [HINT: If you have FontFX, then you
  343. can use this to convert the outline font to draw files
  344. that can be rotated. Save the graph as a draw file, and
  345. then import the y-axis legend from FontFX. Another
  346. alternative is !DrawPlus - Use a horizontal label, and
  347. then convert to a path once in Drawplus and rotate 90
  348. degrees.]
  349.  
  350. If data is saved after legends have been entered, then the
  351. text is also saved, and is reloaded when the data is
  352. reloaded.
  353.  
  354. Layout
  355. ------
  356. This leads to a dialogue window in which various aspects
  357. of the way the graph is laid out may be changed, e.g.
  358. whether the axis pips are inside, outside or straddle
  359. the axis lines, the size of the pips, whether the graph
  360. is boxed in, and the type of symbol used for the data
  361. points. It is now possible to over-ride certain of the
  362. automatic plotting features (e.g. the axis range). These
  363. aspects are under continuous development, and will be
  364. enhanced in future releases.
  365.  
  366. Make Drawfile
  367. -------------
  368. A standard 'save as' dialogue box will be opened. The file
  369. icon may be dragged to a directory viewer, or if the full
  370. filename path is set up it is possible to click on OK. The
  371. file saved is a Drawfile of the graph being displayed. This
  372. file can then be loaded into !Draw for further enhancement.
  373. It is also permissible to drag the file icon into a !draw
  374. window to add the graph to an existing draw document, or
  375. drag the icon to the !draw icon on the iconbar, when a new
  376. draw window will be opened. These latter operations make use
  377. of the wimp$scrap protocol in the present version - direct
  378. memory to memory transfer is to come! The production of
  379. !Draw format files means that the graphs can be loaded into
  380. !Draw for enhancement, and can also be loaded into the
  381. various DTP packages now available (it certainly works for
  382. Acorn DTP and Beebug's Ovation packages).
  383.  
  384. When it is first loaded into !draw, the whole graph appears
  385. as one object, and may be scaled, moved, etc. as a whole.
  386. The line thickness may be changed, etc. The objects
  387. making up the graph may be ungrouped in the normal way.
  388. This allows adjustment of individual parts of the graph,
  389. or annotation. It needs care when dealing with the
  390. individual parts of the graph, otherwise you may
  391. inadvertantly move parts of the axis for example, or
  392. even the graph itself, and have great trouble getting it
  393. back to the correct place.
  394.  
  395. If you are familiar with using !draw, then it should be easy
  396. to play around with the draw files output by !graphdraw.
  397.  
  398. If the graphdraw edit window has input focus, then the
  399. function key F3 may be used as a short cut for this
  400. option.
  401.  
  402. Make plotfile
  403. -------------
  404. This will output a data file of the points AND the
  405. current fitted line in a form suitable for loading into
  406. the MultiPlot application. (If only the points have been
  407. plotted, then only the points will appear in the
  408. multiplot file). This has the same look and feel of
  409. graphdraw, but allows the combining of up to 6 sets of
  410. line and point data onto the set of axes. Multiplot
  411. deals only with the graphical display, it has no data
  412. entry or processing facilities. It will accept plotfiles
  413. from a number of applications besides graphdraw. Contact
  414. the author for information.
  415.  
  416. Print Graph
  417. -----------
  418. Choosing this option gives a printout of the complete graph
  419. via whichever printer driver application is installed. A
  420. printer driver must be installed, otherwise !Graphdraw will
  421. complain. This allows a much higher quality hard copy to be
  422. obtained compared to a simple screen dump, up to the best
  423. available resolution of the printer used. The "Print"
  424. key may be used as a short cut if the edit window has
  425. input focus.
  426.  
  427. Cubic Spline option only
  428. ------------------------
  429.  
  430. Interpolate
  431. -----------
  432. This option is available ONLY from the cubic spline graph,
  433. and allows the interpolation of single values, or the
  434. dumping of a range of values to the printer. Note that it is
  435. not possible to extrapolate the spline curve beyond either
  436. of the end points.
  437.  
  438. *************************************************************
  439.  
  440. For anyone who registers, and is interested, I also have an
  441. application very similar in format and operation to
  442. !GraphDraw, but which does a parameterised least squares fit
  443. of the data to any function which can be entered in BASIC
  444. format. It makes use of BASIC's EVAL function to do all the
  445. hard work. The function can contain up to TEN parameters.
  446.  
  447. This allows you to fit data to logarithmic, exponential, or
  448. trigonometric functions. All graph plotting, printing and
  449. draw file production uses the same routines as !Graphdraw.
  450. However, as it contains the EVAL function it cannot be
  451. compiled, and so runs a little slower.
  452.  
  453. *************************************************************
  454.  
  455.  
  456. The software referred to in these notes is NOT placed into
  457. the  public domain, but remains the copyright of the author,
  458. Chris Johnson. It is released for distribution by Norwich
  459. Computer Services under their Shareware/Careware scheme
  460. only, and should not be posted on bulletin boards or
  461. circulated on any public domain software discs, except by
  462. prior and express agreement with the author, or with Norwich
  463. Computer Services.
  464.  
  465. Anyone obtaining this software by any means other than by
  466. direct purchase from Norwich Computer Services, or from the
  467. author, and making use of the software other than for trial
  468. purposes, is requested to register with the author by
  469. sending £3 (most of which will find its way to an approved
  470. charity), or to send a donation to charity directly to NCS.
  471. All users registering directly with the author will be
  472. informed from time to time of any significant improvements
  473. or 'bug' fixes and will be entitled to upgraded versions of
  474. the software free of charge at any time by sending a
  475. blank disc.
  476.  
  477. The software is supplied as is, and no warranty, either
  478. express or implied, is given as to the suitability of the
  479. software for any purpose.
  480.  
  481. Notwithstanding the above, the author would, of course, be
  482. interested in hearing of any 'bugs' or any  other unexpected
  483. features, and will endeavour to correct any such 'bugs' so
  484. reported in any future issues of this software. Suggestions
  485. for improved features are also most welcome. Implementation
  486. of suggestions depends of course on practicability and more
  487. importantly, the authors spare time (I do have a full time
  488. job!).
  489.  
  490. If you have any comments on this program, or would like to
  491. suggest ways in which it could be improved then the author
  492. can be contacted directly.
  493.  
  494. Chris Johnson
  495. 7 Lovedale Grove
  496. Balerno
  497. Edinburgh
  498. EH14 7DR
  499.  
  500. If you have access to the JANET e-mail system then you
  501. can try
  502.             checaj@uk.ac.hw.clust
  503.  
  504. If you wish to enter into the 'shareware' concept in the
  505. full sense then registrations (>=£3) will be gratefully
  506. received by the  author.
  507.  
  508. If, in any communication, you make specific reference to the 
  509. program code, then please
  510.  
  511.       (a) quote the version number and date
  512.  
  513.       (b) refer only to the program as issued.
  514.  
  515.       (c) supply as many details as possible about the
  516.           problem, and indicate the hardware configuration of
  517.           the machine being used.
  518.  
  519. PLEASE SEND A STAMPED AND SELF ADDRESSED ENVELOPE IF YOU
  520. REQUIRE A REPLY.
  521.  
  522. I hope you find the program of some use.
  523.  
  524. CafJ 10/03/1992
  525.  
  526. Note:  If you are using an A5000, you will find some of
  527. the writable icons look a little odd. This appears to be
  528. an interaction between RISC-OS 3 and the version of the
  529. Interface module that I use. If you have this problem
  530. then I can supply a version with slightly modified
  531. templates with standard writable icons to remove the odd
  532. bordering effect.
  533.  
  534.  
  535.