Ilya Zakharevich on Wed, 1 Mar 2000 15:45:39 -0500

 [PATCH 2.0.18] plothraw with more flags

```Was:
If flag is non zero, join points
Now:
If flag is 1, join points, other non-0 flags should be
combinations of bits 8,16,32,64,128,256 meaning the same as
for ploth()

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.

Enjoy,
Ilya

P.S.  Try with plothraw([-2,-1,0,1],[2,4,-3,-1],256)

--- ./src/graph/plotport.c~	Wed Jan 19 16:35:10 2000
+++ ./src/graph/plotport.c	Wed Mar  1 15:18:28 2000
@@ -1650,7 +1650,7 @@ plothraw0(long stringrect, long drawrect
GEN
plothraw(GEN listx, GEN listy, long flags)
{
-  flags=(flags)? 0: PLOT_POINTS;
+  flags = (flags > 1 ? flags : (flags ? 0: PLOT_POINTS));
return plothraw0(STRINGRECT, DRAWRECT, listx, listy, flags);
}

--- ./src/gp/highlvl.c~	Mon Dec 13 07:42:51 1999
+++ ./src/gp/highlvl.c	Wed Mar  1 15:32:25 2000
@@ -260,7 +260,7 @@ char *helpmessages_highlevel[]={
"plotdraw(list, {flag=0}): draw vector of rectwindows list at indicated x,y positions; list is a vector w1,x1,y1,w2,x2,y2,etc. . If flag!=0, x1, y1 etc. express fractions of the size of the current output device",
"plotfile(filename): set the output file for plotting output. \"-\" redirects to the same place as PARI output",
"ploth(X=a,b,expr,{flags=0},{n=0}): plot of expression expr, X goes from a to b in high resolution. Both flags and n are optional. Binary digits of flags mean : 1 parametric plot, 2 recursive plot, 8 omit x-axis, 16 omit y-axis, 32 omit frame, 64 do not join points, 128 plot both lines and points, 256 use cubic splines. n specifies number of reference points on the graph (0=use default value). Returns a vector for the bounding box",
-  "plothraw(listx,listy,{flag=0}): plot in high resolution points whose x (resp. y) coordinates are in listx (resp. listy). If flag is non zero, join points",
+  "plothraw(listx,listy,{flag=0}): plot in high resolution points  whose x (resp. y) coordinates are in listx (resp. listy). If flag is 1, join points, other non-0 flags should be combinations of bits 8,16,32,64,128,256 meaning the same as for ploth()",
"plothsizes({flag=0}): returns array of 6 elements: terminal width and height, sizes for ticks in horizontal and vertical directions, width and height of characters.  If flag=0, sizes of ticks and characters are in pixels, otherwise are fractions of the screen size",
"plotinit(w,{x=0},{y=0},{flag=0}): initialize rectwindow w to size x,y. If flag!=0, x and y express fractions of the size of the current output device. x=0 or y=0 means use the full size of the device",
"plotkill(w): erase the rectwindow w",
```