Plot coordinate pairs/REXX: Difference between revisions
Content added Content deleted
(added the help documentation for the $PLOT.REX (REXX) program) |
(added help, sample, and flow text for the $PLOT.REX (REXX) program.) |
||
Line 3: | Line 3: | ||
This is a general purpose REXX program that supports a variety of options and data formats and produces output in text format. |
This is a general purpose REXX program that supports a variety of options and data formats and produces output in text format. |
||
See the HELP documentation below. |
See the HELP and SAMPLE documentation below. |
||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
==REXX program== |
==$PLOT.REX (REXX) program== |
||
<lang rexx>/**/trace o;parse arg !;if !all(arg()) then exit;if !cms then address '';signal on halt;signal on novalue;signal on syntax |
<lang rexx>/**/trace o;parse arg !;if !all(arg()) then exit;if !cms then address '';signal on halt;signal on novalue;signal on syntax |
||
Line 453: | Line 453: | ||
syntax: !sigl=sigl; call er 13,!fid(2) !fid(3) !sigl !cal() condition('D') sourceline(!sigl)</lang> |
syntax: !sigl=sigl; call er 13,!fid(2) !fid(3) !sigl !cal() condition('D') sourceline(!sigl)</lang> |
||
==REXX program |
==$PLOT.REX (REXX) program HELP== |
||
<pre> |
<pre> |
||
Line 765: | Line 765: | ||
Ω |
Ω |
||
</pre> |
|||
==$PLOT.REX (REXX) program SAMPLE usages== |
|||
<pre> |
|||
╔══════════════════════════════════════════╗ |
|||
║ sample uses of the $PLOT REXX command ║ |
|||
╚══════════════════════════════════════════╝ |
|||
████████████████████████████████████████████████████████████████████████████████ |
|||
─── how to get help information for the $PLOT command (two methods are shown) |
|||
(press ESC to quit viewing the help file) |
|||
$H $PLOT |
|||
$PLOT ? |
|||
████████████████████████████████████████████████████████████████████████████████ |
|||
─── how to invoke $PLOT to show a plot of the some Fibonocci numbers |
|||
$PLOT 1,0 2,0 3,1 4,2 5,3 6,5 7,8 8,13 9,21 10,34 11,55 12,89 |
|||
│89 · |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ · |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ · |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ · |
|||
│ |
|||
│ |
|||
│ |
|||
│ · |
|||
│ |
|||
│ |
|||
│ · |
|||
│ · |
|||
│ · |
|||
│0 · · 12 |
|||
└──────·─────·──────────────────────────────────────────────────────────────── |
|||
████████████████████████████████████████████████████████████████████████████████ |
|||
─── how to invoke $PLOT (as above), but the data points are in the (DOS) |
|||
file: FIB.DAT (plot is not shown as it is a duplicate of above) |
|||
$PLOT getfile fib.dat |
|||
████████████████████████████████████████████████████████████████████████████████ |
|||
─── how to invoke $PLOT (as above), but the data are expressed as singlur |
|||
points |
|||
$PLOT 0 1 2 3 5 8 13 21 34 55 89 singlevalues |
|||
│89 · |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ · |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ · |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ |
|||
│ · |
|||
│ |
|||
│ |
|||
│ |
|||
│ · |
|||
│ |
|||
│ |
|||
│ · |
|||
│ · |
|||
│ · |
|||
│0 · · 11 |
|||
└──────·────────────────────────────────────────────────────────────────────── |
|||
████████████████████████████████████████████████████████████████████████████████ |
|||
─── how to invoke $PLOT but limit the screen (plot) depth to 25, and the |
|||
screen (plot) width to 40 |
|||
$PLOT -4,-2 -3,-1 -2,0 -1,1 0,1 1,1 2,2 3,3 sd 25 sw 40 |
|||
│3 · |
|||
│ |
|||
│ |
|||
│ |
|||
│ · |
|||
│ |
|||
│ |
|||
│ |
|||
· · · |
|||
│ |
|||
│ |
|||
│ |
|||
-4 │ 3 |
|||
───────────·──────────┼─────────────── |
|||
│ |
|||
│ |
|||
│ |
|||
· │ |
|||
│ |
|||
│ |
|||
│ |
|||
· │-2 |
|||
████████████████████████████████████████████████████████████████████████████████ |
|||
♦ |
|||
</pre> |
|||
==$PLOT.REX (REXX) program logic FLOW== |
|||
<pre> |
|||
┌───────────────┐ ╔═══════════╗ |
|||
│ $H for ?opts ├────◄──╢ ║ |
|||
└───────────────┘ ║ $PLOT ║ |
|||
║ ║ ┌────────┐ |
|||
║ ║ ┌─────────────────┐ │ $T for│ |
|||
║ errors╟───►─┤ $ERR for err msg├─►─┤ color │ |
|||
║ ║ └─────────────────┘ │ msgs │ |
|||
║ ║ └────────┘ |
|||
║ ║ |
|||
║ ║ ┌──────────┐ |
|||
║ LOG╟──►────┤ $GETTFID │ |
|||
║ ║ └──┬───────┘ |
|||
║ ╟─────◄────┘ |
|||
║ ║ |
|||
║ ║ |
|||
║ ║ |
|||
║ ║ ┌─────────┐ |
|||
┌───────────────────┐ ║ ╟──►───┤ SCRSIZE │ |
|||
│ $T for color,log ├───◄──╢output ║ └──┬──────┘ |
|||
└────────────────┬──┘ ┌──►─╢ ╟────◄────┘ |
|||
└──►─┘ ╚═══════════╝ |
|||
</pre> |
</pre> |