Ilya Zakharevich on Fri, 3 Mar 2000 15:24:21 -0500

 Re: [PATCH 2.0.18] plothraw with more flags

```On Wed, Mar 01, 2000 at 03:45:39PM -0500, Ilya Zakharevich wrote:
> This change is a first step of a more ambitious plan.  For the most
> harmonic interaction of high-level and low-level plotting functions we
> need
>
>    a) a possiblity of high-level plotting functions "plotting to
>       vectors" instead of plotting to rectangles/output-device,
>
> *and*
>
>    b) a possibility to plot these vectors in the same ways as the
>       current high-level functions do.
>
> This splitting of plotting into two stages would allow arbitrary
> transformations inserted in between of these two steps.  One possible
> solution for "b" is to modify plotpoints() to accept a flag (with the
> default being 64).  Another one would be to have an entirely new
> function which would allow plotting several curves simultaneously, and
> would accept different formats: those good for several parametric
> curves or several x-to-y curves.

Stupid me!  Just let function(s)-graph operators accept a precooked
array of results as the "expr" argument if an appropriate flag is given.

So instead of providing the function to calculate points of the
graphs, one would be able to provide the list of results of
calculation of this function in appropriate points.

Say,

ploth(X=7, 13, [ [1,1], [2,8], [3,27], [4,64] ], parametric+list+splines)

will plot the graph of x^3 on [1,4] (so arguments X, 7, and 13 are ignored)

ploth(X=7, 13, [ [1,1], [2,8], [3,27], [4,64] ], list+splines)

will plot two curves (x-6)/2 and ((x-6)/2)^3 on [7,13], and

ploth(X=[5,6,7,8], 13, [ [1,1], [2,8], [3,27], [4,64] ], list+splines)

will plot two curves (x-4) and (x-4)^3 on [5,8] (so the argument 13
is ignored).

In all of these cases the bit "list" can be deduced from the input.
It cannot be deduced in

ploth(X=7, 13, [ 1, 8, 27, 64 ], list+splines)

which should plot ((x-6)/2)^3.

Do you like this?  Should we autodeduce "list" (probably 512)?

Ilya
```