PLOT UTILITY by Ron Wiesen 6/2/91 Described is a utility "Plotter". It is in BASIC and it is file"PLOT.DO". It requires the "Backbone" utility manager. File "UTIL.DO" is the Backbone. Plotter plots numeric values on the Liquid Crystal Display (LCD) in either Y-only mode or Y&X mode. Y-only mode plots each value as a vertical Y coordinate at the next LCD horizontal position, for up to 240 points (240 horizontal positions). Y&X mode plots one point on the LCD per pair of Y and X coordinates, thus the number of points that are plotted is only limited by the amount of available numeric data. Command Syntax and Arguments The Plotter command syntax can have up to 10 arguments. This is shown below; arguments that are shown as all capitalized are literal, arguments within braces [] are optional. Command syntax: PLOT [buf#] [Yb] [Yt] [Xl] [Xr] [Yo] [Xo] [dot] [over] Arg symbol description 1 PLOT command name of Plotter 2 [buf#] buffer number of open file that contains plot data. Action per sign: positive - plots and increments U% for each point plotted 0 (nul) - no plot, sets defaults and overwrites them per other arguments negative - plots (U% unaffected) 3 [Yb] Y limit for bottom LCD edge 4 [Yt] Y limit for top LCD edge Yb and Yt must differ 5 [Xl] X limit for left LCD edge 6 [Xr] X limit for right LCD edge If Xl and Xr differ, Y&X mode 7 [Yo] Y origin; vertical Y axis 8 [Xo] X origin; horizontal X axis If Yo or Xo not nul, origin is set 9 [dot] plots as dots, not as a line 10 [over] plots over prior LCD display If dot/over not nul or 0, function on Example Call to Plotter 10 N$="PLOT -5 -1 1 3.5 -3.5 0 0":GOSUB The example above plots from file buffer #5, within bottom/top limits of -1/+1, in Y&X mode within left/right limits of +3.5/-3.5, draws Y/X origin lines that cross at 0/0, and does not alter variable U%. Note: dot and keep functions are per prior PLOT call or per default. Utility/Backbone Particulars The Plotter line numbers are shown below: LINE 65101 - Backbone/Plotter link LINE 65201 ... 65234 - program area LINE 65514 - Plotter error DATA The Plotter has four errors. The error numbers and error text are shown below: 101 "bottom & top Y BOUNDS are EQUAL" 102 "read Y OK, End of File on X" 103 "Y Out of Bounds" 104 "X Out of Bounds" Array/Variable Usage The Plotter uses one-letter string array as shown below: U$() - parsed command string. Structure: U$(0) - number of arguments U$(1) - PLOT u$(2) - [2nd ARGUMENT] ... U$(10) - [10th ARGUMENT] The Plotter uses one-letter double-precision array as shown below: U#() - numeric equivalent of U$() The Plotter uses two-letter integer array as shown below: UU%(UB%) - plot point count to user. Backbone transfers it to U% on return to user. The Plotter uses two-letter double-precision variables as shown below: UI# - delta Y UJ# - delta X UK# - Y/X UL# - normalized Y/X (0 to 1) UN# - Y/X limit The Plotter uses two-letter integer variables as shown below: UB% - utility nest level UI% ... UJ% - general purposes. UK% - Y&X mode flag UL% - plot point counter UP% - Y/X out of bounds flag