Having played a little I have discovered a few
abilities and inabilities of these programs.
JHS's plot works nicely for xy 'line' plots if it's
y argument contains a box of sorted x values appended to a
box of (possibly laminated, if multiple) corresponding y
values. The sorting is necessary to get the plot axes
correct (at least with x and y values between 0 and 1 --
untested otherwise), and plot itself applies the boxed x
values to each set of y values before showing its result.
[plot handles a single list of boxed or unboxed values, as
if the values are y values.]
However, as is, plot does not produce different
colors for each of multiple lines, and produces a stinky
color of all lines without some hand holding. This
handholding is especially noxious in a Lab because plot
always contains a 'reset', and that reset undoes any color
(etc) options produced after the previous plot. Thus, as is,
to get decent colors one must produce an "ugly" plot and
then a second `'<option> show' jgc ''` to produce the
desired <option>. A workaround for this is to alter the last
line of the plot script as follows, so I am recommending
that change.
('reset ',type,' &chtt=',t,' show')jgc y
('reset ',type,' &chco=<COLORS>&chtt=',t,' show')jgc y
Another discovery is that a "scatter chart" type of
xy plot (with no lines, only points) works nicely with no
change to plot, but with an "ugly" plot followed by the
following command changing to plot type to `s`. The
ugliness is due to the reset embedded in each plot.
'&cht=s show' jgc ''
As is, the left argument of JHS plot attempts to
deal with a very few options in the original plot routine
and cannot work with the `&`-style options of google charts.
I wonder if the JHS plot could be rewritten to deal more
with the latter, than the original plot routines options?
Does that appeal to others?
It might also be nice to add an assert which checks
on the sortedness of the x values of a line plot.
--
(B=)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm