| Ilya Zakharevich on Sun, 8 Nov 1998 03:05:45 -0500 (EST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| 2.0.12: patch for plotting |
What:
a) New function plotfile() to reset output file for plotting (void
without gnuplot);
b) New function plotpointsize() to scale symbols plotted for points (void
without gnuplot);
c) plotpointtype()/plotlinetype() allow rect==-1 for highlevel plotting (void
without gnuplot);
d) Allow plotting with both lines and points printed (since point size
is customizable, it may be made good both visibly and clutter-wise)
(bit 128 of flags is used for this).
e) Rename outfile to pari_outfile (conflict with gnuplot);
I did not update master docs, only online docs. Tested with gnuplot
terminals only.
Say, with gnuplot output one can do things like this:
plotpointtype(-1,1)
plotlinetype(-1,5)
plotpointsize(-1,0.4)
plotfile("out.latex")
plotterm("emtex")
ploth(x=1,4,sin(x),128+2)
\\ close the plotfile
plotfile("-")
plotterm("dumb")
ploth(x=1,4,sin(x),128+2)
Enjoy,
Ilya
diff -pru pari-2.0.12.alpha.ini/src/gp/gp.c pari-2.0.12.alpha/src/gp/gp.c
--- pari-2.0.12.alpha.ini/src/gp/gp.c Fri Nov 6 10:08:32 1998
+++ pari-2.0.12.alpha/src/gp/gp.c Sat Nov 7 17:55:06 1998
@@ -2591,7 +2591,7 @@ read_opt(long argc, char **argv)
char *b=NULL, *p=NULL, *s=NULL, **pre=(char**)1;
int i=1;
- outfile=stderr;
+ pari_outfile=stderr;
while (i<argc)
{
char *t = argv[i++];
@@ -2624,7 +2624,7 @@ read_opt(long argc, char **argv)
testint(p, &primelimit);
testint(s, &parisize);
if (under_emacs) disable_color=1;
- outfile=stdout; return pre;
+ pari_outfile=stdout; return pre;
}
int
diff -pru pari-2.0.12.alpha.ini/src/gp/gp_rl.c pari-2.0.12.alpha/src/gp/gp_rl.c
--- pari-2.0.12.alpha.ini/src/gp/gp_rl.c Fri Nov 6 10:08:30 1998
+++ pari-2.0.12.alpha/src/gp/gp_rl.c Sat Nov 7 17:55:08 1998
@@ -511,17 +522,17 @@ static int
rl_short_help(int count, int key)
{
int p=rl_point, off=p, e = rl_end;
- FILE *save = outfile;
+ FILE *save = pari_outfile;
long flag = h_RL;
while (off && is_keyword_char(rl_line_buffer[off-1])) off--;
- rl_point = 0; rl_end = 0; outfile = rl_outstream;
+ rl_point = 0; rl_end = 0; pari_outfile = rl_outstream;
if (count < 0) flag |= h_LONG; /* long help */
_rl_save_prompt();
rl_message("",0,0);
aide(rl_line_buffer + off, flag);
_rl_restore_prompt();
- rl_point = p; rl_end = e; outfile = save;
+ rl_point = p; rl_end = e; pari_outfile = save;
rl_clear_message();
rl_refresh_line(); return 0;
}
diff -pru pari-2.0.12.alpha.ini/src/graph/Gnuplot.h pari-2.0.12.alpha/src/graph/Gnuplot.h
--- pari-2.0.12.alpha.ini/src/graph/Gnuplot.h Wed Sep 16 07:07:10 1998
+++ pari-2.0.12.alpha/src/graph/Gnuplot.h Sun Nov 8 02:46:20 1998
@@ -48,9 +48,7 @@
#ifndef NO_JUNK_SMALL
extern FILE *outfile;
-#ifndef BITS_IN_HALFULONG /* In pari it is already defined. */
FILE *outfile = stdout;
-#endif
extern int encoding;
int encoding = 0;
@@ -71,7 +69,8 @@ double ticscale = 1.0; /* scale f
char *input_line = NULL;
int inline_num; /* from command.c */
-float xsize=1.0, ysize=1.0, pointsize=1.0; /* During test! */
+float xsize=1.0, ysize=1.0;
+double pointsize=1.0; /* During test! */
int interactive; /* from plot.c */
char *infile_name; /* from plot.c */
@@ -143,7 +142,7 @@ bail_to_command_line()
croak("panic: gnuplot");
}
-#endif
+#endif /* NO_JUNK_SMALL */
/* Cannot pull the whole plot.h, too many contradictions. */
@@ -238,7 +237,7 @@ struct termentry *term;
#define point(x,y,p) CALL_G_METH3(point,x,y,p)
#define arrow(sx,sy,ex,ey,head) CALL_G_METH5(arrow,sx,sy,ex,ey,head)
#define set_font(font) CALL_G_METH1IP(set_font,font)
-#define pointsize(size) CALL_G_METH1D(pointsize,size)
+#define setpointsize(size) CALL_G_METH1D(pointsize,size)
#define suspend() CALL_G_METH0(suspend)
#define resume() CALL_G_METH0(resume)
#define fillbox(sx,sy,ex,ey,head) CALL_G_METH5(fillbox,sx,sy,ex,ey,head)
diff -pru pari-2.0.12.alpha.ini/src/graph/plotgnuplot.c pari-2.0.12.alpha/src/graph/plotgnuplot.c
--- pari-2.0.12.alpha.ini/src/graph/plotgnuplot.c Fri Nov 6 10:08:46 1998
+++ pari-2.0.12.alpha/src/graph/plotgnuplot.c Sun Nov 8 02:53:04 1998
@@ -34,6 +34,7 @@ rectdraw0(long *w, long *x, long *y, lon
graphics(); /* Switch on terminal. */
linetype(line_type); /* X does not work otherwise. */
+ setpointsize(pointsize);
for(i=0;i<lw;i++)
{
e=rectgraph[w[i]]; p1=RHead(e); x0=x[i]; y0=y[i];
@@ -103,6 +104,10 @@ rectdraw0(long *w, long *x, long *y, lon
case ROt_PTT:
point_type = RoPTTpen(p1);
break;
+ case ROt_PTS:
+ pointsize = RoPTSsize(p1);
+ setpointsize(pointsize);
+ break;
case ROt_LNT:
linetype(RoLNTpen(p1));
break;
@@ -127,13 +132,17 @@ PARI_get_plot(long fatal)
long
term_set(char *s)
{
- if (strlen(s) > PLOT_NAME_LEN) err(talker,"too long name for terminal");
- if (*pari_plot.name && (strcmp(pari_plot.name,s) != 0)) {
+ if (*s == 0)
+ s = pari_plot.name;
+ if (strlen(s) > PLOT_NAME_LEN)
+ err(talker,"too long name \"%s\"for terminal", s);
+ if (*pari_plot.name && (strcmp(pari_plot.name,s) != 0))
reset();
- }
strcpy(pari_plot.name,s);
- if (!termset( s )) err(talker,"unknown terminal name");
+ if (!termset( s ))
+ err(talker,"error setting terminal \"\%s\"", s);
do_init(); /* Init terminal. */
+ setpointsize(pointsize);
w_width = termprop(xmax);
w_height = termprop(ymax);
@@ -142,5 +151,32 @@ term_set(char *s)
h_unit = termprop(h_tic);
v_unit = termprop(v_tic);
pari_plot.init = 1;
+
return 1;
+}
+
+long
+plot_outfile_set(char *s) {
+ int normal = (strcmp(s,"-") == 0);
+
+ /* Delegate all the hard work to term_set_output() */
+
+ if (normal)
+ term_set_output(NULL);
+ else { /* term_set_output() needs
+ a malloced string */
+ char *s1 = (char*) malloc(strlen(s) + 1);
+
+ strcpy(s1,s);
+ term_set_output(s1);
+ }
+ return 1;
+}
+
+void
+set_pointsize(double d)
+{
+ pointsize = d;
+ if (pari_plot.init)
+ setpointsize(d);
}
diff -pru pari-2.0.12.alpha.ini/src/graph/plotport.c pari-2.0.12.alpha/src/graph/plotport.c
--- pari-2.0.12.alpha.ini/src/graph/plotport.c Fri Nov 6 10:08:44 1998
+++ pari-2.0.12.alpha/src/graph/plotport.c Sat Nov 7 19:04:42 1998
@@ -18,6 +18,8 @@ static void PARI_get_psplot();
static long current_color[NUMRECT];
PariRect **rectgraph = NULL;
PARI_plot pari_plot, pari_psplot;
+long rectpoint_itype = 0;
+long rectline_itype = 0;
#define STRINGRECT (NUMRECT-2)
#define DRAWRECT (NUMRECT-1)
@@ -595,6 +597,9 @@ rectstring(long ne, char *str) /* code =
void
rectpointtype(long ne, long type) /* code = 0 */
{
+ if (ne == -1) {
+ rectpoint_itype = type;
+ } else {
PariRect *e = check_rect_init(ne);
RectObj *z = (RectObj*) gpmalloc(sizeof(RectObjPN));
@@ -602,11 +607,31 @@ rectpointtype(long ne, long type) /* cod
RoPTTpen(z) = type;
if (!RHead(e)) RHead(e)=RTail(e)=z;
else { RoNext(RTail(e))=z; RTail(e)=z; }
+ }
+}
+
+void
+rectpointsize(long ne, GEN size) /* code = 0 */
+{
+ if (ne == -1) {
+ set_pointsize(gtodouble(size)); /* Immediate set */
+ } else {
+ PariRect *e = check_rect_init(ne);
+ RectObj *z = (RectObj*) gpmalloc(sizeof(RectObjPS));
+
+ RoNext(z) = 0; RoType(z) = ROt_PTT;
+ RoPTSsize(z) = gtodouble(size);
+ if (!RHead(e)) RHead(e)=RTail(e)=z;
+ else { RoNext(RTail(e))=z; RTail(e)=z; }
+ }
}
void
rectlinetype(long ne, long type)
{
+ if (ne == -1) {
+ rectline_itype = type;
+ } else {
PariRect *e = check_rect_init(ne);
RectObj *z = (RectObj*) gpmalloc(sizeof(RectObjPN));
@@ -614,6 +639,7 @@ rectlinetype(long ne, long type)
RoLNTpen(z) = type;
if (!RHead(e)) RHead(e)=RTail(e)=z;
else { RoNext(RTail(e))=z; RTail(e)=z; }
+ }
}
void
@@ -663,7 +689,7 @@ rectcopy(long source, long dest, long xo
RoSTx(next) += xoff; RoSTy(next) += yoff;
RoNext(tail) = next; tail = next;
break;
- case ROt_PTT: case ROt_LNT:
+ case ROt_PTT: case ROt_LNT: case ROt_PTS:
next = (RectObj*) gpmalloc(sizeof(RectObjPN));
memcpy(next,p1,sizeof(RectObjPN));
RoNext(tail) = next; tail = next;
@@ -1112,20 +1138,24 @@ rectplothrawin(long stringrect, long dra
current_color[drawrect]=RED;
for (; ltype < nc; )
{
- rectpointtype(drawrect,ltype); /* Graphs. */
- rectlinetype(drawrect,ltype++); /* Graphs. */
if (nc>1)
{
- if (ltype & 1) current_color[drawrect]=SIENNA;
- else current_color[drawrect]=RED;
+ if (ltype & 1) current_color[drawrect]=RED;
+ else current_color[drawrect]=SIENNA;
}
if (flags & PLOT_PARAMETRIC) x=data[i++];
y=data[i++]; nbpoints=y.nb;
- if (flags & PLOT_POINTS)
- rectpoints0(drawrect,x.d,y.d,nbpoints);
- else
- rectlines0(drawrect,x.d,y.d,nbpoints,0);
+ if ((flags & PLOT_POINTS_LINES) || (flags & PLOT_POINTS)) {
+ rectlinetype(drawrect, rectpoint_itype + ltype); /* Graphs. */
+ rectpointtype(drawrect, rectpoint_itype + ltype); /* Graphs. */
+ rectpoints0(drawrect,x.d,y.d,nbpoints);
+ }
+ if ((flags & PLOT_POINTS_LINES) || !(flags & PLOT_POINTS)) {
+ rectlinetype(drawrect, rectline_itype + ltype); /* Graphs. */
+ rectlines0(drawrect,x.d,y.d,nbpoints,0);
+ }
+ ltype++; /* Graphs. */
}
for (i--; i>=0; i--) free(data[i].d);
free(data);
diff -pru pari-2.0.12.alpha.ini/src/graph/plotsun.c pari-2.0.12.alpha/src/graph/plotsun.c
--- pari-2.0.12.alpha.ini/src/graph/plotsun.c Fri Nov 6 10:08:44 1998
+++ pari-2.0.12.alpha/src/graph/plotsun.c Sun Nov 8 02:06:56 1998
@@ -172,3 +172,11 @@ term_set(char *s)
{
return 1;
}
+
+long
+plot_outfile_set(char *s) { return 1; }
+
+void
+set_pointsize(double d)
+{
+}
diff -pru pari-2.0.12.alpha.ini/src/graph/plotX.c pari-2.0.12.alpha/src/graph/plotX.c
--- pari-2.0.12.alpha.ini/src/graph/plotX.c Fri Nov 6 10:08:46 1998
+++ pari-2.0.12.alpha/src/graph/plotX.c Sun Nov 8 02:07:02 1998
@@ -159,7 +159,7 @@ rectdraw0(long *w, long *x, long *y, lon
{
rcolcnt[col][ROt_MV]=rcolcnt[col][ROt_PT]=rcolcnt[col][ROt_LN]=0;
rcolcnt[col][ROt_BX]=rcolcnt[col][ROt_MP]=rcolcnt[col][ROt_ML]=0;
- rcolcnt[col][ROt_ST]=rcolcnt[col][ROt_PTT]=rcolcnt[col][ROt_LNT]=0;
+ rcolcnt[col][ROt_ST]=rcolcnt[col][ROt_PTT]=rcolcnt[col][ROt_PTS]=rcolcnt[col][ROt_LNT]=0;
}
for(i=0;i<lw;i++)
@@ -179,6 +179,7 @@ rectdraw0(long *w, long *x, long *y, lon
break; /* String */
case ROt_MV : /* Move */
case ROt_PTT: /* Point type change */
+ case ROt_PTS: /* Point size change */
case ROt_LNT: rcnt[RoType(p1)]++; /* Line type change */
}
p1=RoNext(p1);
@@ -369,3 +370,11 @@ PARI_get_plot(long fatal)
long
term_set(char *s) { return 1; }
+
+long
+plot_outfile_set(char *s) { return 1; }
+
+void
+set_pointsize(double d)
+{
+}
diff -pru pari-2.0.12.alpha.ini/src/graph/rect.h pari-2.0.12.alpha/src/graph/rect.h
--- pari-2.0.12.alpha.ini/src/graph/rect.h Fri Nov 6 10:08:44 1998
+++ pari-2.0.12.alpha/src/graph/rect.h Sat Nov 7 19:03:34 1998
@@ -82,6 +82,12 @@ typedef struct RectObjPN {
long pen;
} RectObjPN;
+typedef struct RectObjPS {
+ struct RectObj *next;
+ long code,color;
+ double size;
+} RectObjPS;
+
#define BLACK 1 /* Default */
#define BLUE 2 /* Axes */
#define SIENNA 3 /* Odd numbered curves in ploth */
@@ -102,9 +108,10 @@ typedef struct RectObjPN {
#define ROt_ST 6 /* String */
#define ROt_PTT 7 /* Point type change */
#define ROt_LNT 8 /* Line type change */
-#define ROt_NULL 9 /* To be the start of the chain */
+#define ROt_PTS 9 /* Point size change */
+#define ROt_NULL 10 /* To be the start of the chain */
-#define ROt_MAX 9 /* Maximal type */
+#define ROt_MAX 10 /* Maximal type */
/* Pointer conversion. */
@@ -116,6 +123,7 @@ typedef struct RectObjPN {
#define RoML(rop) ((RectObjMP*)rop)
#define RoST(rop) ((RectObjST*)rop)
#define RoPTT(rop) ((RectObjPN*)rop)
+#define RoPTS(rop) ((RectObjPS*)rop)
#define RoLNT(rop) ((RectObjPN*)rop)
#define RoNULL(rop) ((RectObj*)rop)
@@ -163,21 +171,27 @@ typedef struct RectObjPN {
#define RoPTTpen(rop) (RoPTT(rop)->pen)
#define RoLNTpen(rop) (RoLNT(rop)->pen)
+#define RoPTSsize(rop) (RoPTS(rop)->size)
#define PL_POINTS 1
#define GOODRECT(r) (0 <= r && r < NUMRECT)
#define GOODCOLOR(c) (1 <= c && c < MAX_COLORS)
-#define PLOT_PARAMETRIC 1
-#define PLOT_RECURSIVE 2
-#define PLOT_NO_RESCALE 4
-#define PLOT_NO_AXE_X 8
-#define PLOT_NO_AXE_Y 16
-#define PLOT_NO_FRAME 32
-#define PLOT_POINTS 64
-#define PLOT_POSTSCRIPT 128
+#define PLOT_PARAMETRIC 0x00001
+#define PLOT_RECURSIVE 0x00002
+#define PLOT_NO_RESCALE 0x00004
+#define PLOT_NO_AXE_X 0x00008
+#define PLOT_NO_AXE_Y 0x00010
+#define PLOT_NO_FRAME 0x00020
+#define PLOT_POINTS 0x00040
+#define PLOT_POINTS_LINES 0x00080
+#define PLOT_SPLINES 0x00100
+
+#define PLOT_POSTSCRIPT 0x80000
extern PariRect **rectgraph;
+extern long rectpoint_itype;
+extern long rectline_itype;
/* plotport.c */
@@ -207,6 +221,7 @@ GEN rectplothraw(long drawrect, GEN
void rectpoint(long ne, GEN x, GEN y);
void rectpoints(long ne, GEN listx, GEN listy);
void rectpointtype(long ne, long t);
+void rectpointsize(long ne, GEN size);
void rectrbox(long ne, GEN gx2, GEN gy2);
void rectrline(long ne, GEN gx2, GEN gy2);
void rectrmove(long ne, GEN x, GEN y);
@@ -218,3 +233,5 @@ void rectstring(long ne, char *x);
void PARI_get_plot(long fatal);
long term_set(char *s);
+long plot_outfile_set(char *s);
+void set_pointsize(double d);
diff -pru pari-2.0.12.alpha.ini/src/headers/paricom.h pari-2.0.12.alpha/src/headers/paricom.h
--- pari-2.0.12.alpha.ini/src/headers/paricom.h Fri Nov 6 10:08:46 1998
+++ pari-2.0.12.alpha/src/headers/paricom.h Sat Nov 7 17:55:08 1998
@@ -32,7 +32,7 @@
/* Common global variables: */
extern PariOUT *pariOut, *pariErr;
-extern FILE *outfile, *logfile, *infile, *errfile;
+extern FILE *pari_outfile, *logfile, *infile, *errfile;
extern long DEBUGFILES, DEBUGLEVEL, DEBUGMEM, precdl;
extern long *ordvar;
diff -pru pari-2.0.12.alpha.ini/src/headers/paristio.h pari-2.0.12.alpha/src/headers/paristio.h
--- pari-2.0.12.alpha.ini/src/headers/paristio.h Fri Nov 6 10:08:48 1998
+++ pari-2.0.12.alpha/src/headers/paristio.h Sat Nov 7 17:55:08 1998
@@ -37,7 +37,7 @@ typedef struct pariFILE {
/* Common global variables: */
extern PariOUT *pariOut, *pariErr;
-extern FILE *outfile, *logfile, *infile, *errfile;
+extern FILE *pari_outfile, *logfile, *infile, *errfile;
extern ulong avma,bot,top,memused;
extern byteptr diffptr;
diff -pru pari-2.0.12.alpha.ini/src/language/es.c pari-2.0.12.alpha/src/language/es.c
--- pari-2.0.12.alpha.ini/src/language/es.c Fri Nov 6 10:08:52 1998
+++ pari-2.0.12.alpha/src/language/es.c Sat Nov 7 17:55:08 1998
@@ -137,19 +137,19 @@ PariOUT *pariOut, *pariErr;
static void
normalOutC(char c)
{
- putc(c, outfile);
+ putc(c, pari_outfile);
if (logfile) putc(c, logfile);
}
static void
normalOutS(char *s)
{
- fputs(s, outfile);
+ fputs(s, pari_outfile);
if (logfile) fputs(s, logfile);
}
static void
normalOutF(void)
{
- fflush(outfile);
+ fflush(pari_outfile);
if (logfile) fflush(logfile);
}
PariOUT defaultOut = {normalOutC, normalOutS, normalOutF, NULL};
@@ -341,8 +341,8 @@ putc80(char c)
{
if (c == '\n') col_index = -1;
else if (col_index == MAX_WIDTH)
- { putc('\n',outfile); col_index = 0; }
- putc(c, outfile); col_index++;
+ { putc('\n',pari_outfile); col_index = 0; }
+ putc(c, pari_outfile); col_index++;
}
#undef MAX_WIDTH
static void
@@ -2078,12 +2078,12 @@ switchout(char *name)
{
FILE *f = fopen(name, "a");
if (!f) err(openfiler,"output",name);
- outfile = f;
+ pari_outfile = f;
}
- else if (outfile != stdout)
+ else if (pari_outfile != stdout)
{
- fclose(outfile);
- outfile = stdout;
+ fclose(pari_outfile);
+ pari_outfile = stdout;
}
}
diff -pru pari-2.0.12.alpha.ini/src/language/highlvl.c pari-2.0.12.alpha/src/language/highlvl.c
--- pari-2.0.12.alpha.ini/src/language/highlvl.c Fri Nov 6 10:08:56 1998
+++ pari-2.0.12.alpha/src/language/highlvl.c Sat Nov 7 19:34:36 1998
@@ -135,6 +135,7 @@ entree functions_highlevel[]={
{"plotcopy",44,(void*)rectcopy,10,"vLLLL"},
{"plotcursor",11,(void*)rectcursor,10,"L"},
{"plotdraw",99,(void*)rectdraw,10,"vG"},
+{"plotfile",16,(void*)plot_outfile_set,10,"ls"},
{"ploth",99,(void*)ploth,10,"V=GGIpD0,L,D0,L,"},
{"plothraw",25,(void*)plothraw,10,"GGD0,L,"},
{"plothsizes",0,(void*)plothsizes,10,""},
@@ -144,6 +145,7 @@ entree functions_highlevel[]={
{"plotlinetype",19,(void*)rectlinetype,10,"vLL"},
{"plotmove",35,(void*)rectmove,10,"vLGG"},
{"plotpoints",35,(void*)rectpoints,10,"vLGG"},
+{"plotpointsize",99,(void*)rectpointsize,10,"vLG"},
{"plotpointtype",19,(void*)rectpointtype,10,"vLL"},
{"plotrbox",35,(void*)rectrbox,10,"vLGG"},
{"plotrecth",73,(void*)rectploth,10,"LV=GGIpD0,L,D0,L,"},
@@ -172,18 +174,20 @@ char *helpmessages_highlevel[]={
"plotcopy(sourcew,destw,dx,dy): copy the contents of rectwindow sourcew to rectwindow destw with offset (dx,dy)",
"plotcursor(w): current position of cursor in rectwindow w",
"plotdraw(list): draw vector of rectwindows list at indicated x,y positions; list is a vector w1,x1,y1,w2,x2,y2,etc. . ",
- "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. n specifies number of reference points on the graph (0=use default value). Returns a vector for the bounding box",
+ "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. 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",
"plothsizes(): returns array of 6 elements: terminal width and height, sizes for ticks in horizontal and vertical directions (in pixels), width and height of characters",
"plotinit(w,x,y): initialize rectwindow w to size x,y",
"plotkill(w): erase the rectwindow w",
"plotlines(w,listx,listy,{flag=0}): draws an open polygon in rectwindow w where listx and listy contain the x (resp. y) coordinates of the vertices. If listx and listy are both single values (i.e not vectors), draw the corresponding line (and move cursor). If (optional) flag is non-zero, close the polygon",
- "plotlinetype(w,type): change the type of following lines in rectwindow w. -2 corresponds to frames, -1 to axes, larger values may correspond to something else",
+ "plotlinetype(w,type): change the type of following lines in rectwindow w. type -2 corresponds to frames, -1 to axes, larger values may correspond to something else. w=-1 changes highlevel plotting",
"plotmove(w,x,y): move cursor to position x,y in rectwindow w",
"plotpoints(w,listx,listy): draws in rectwindow w the points whose x (resp y) coordinates are in listx (resp listy). If listx and listy are both single values (i.e not vectors), draw the corresponding point (and move cursor)",
- "plotpointtype(w,type): change the type of following points in rectwindow w. -1 corresponds to a dot, larger values may correspond to something else",
+ "plotpointsize(w,size): change the \"size\" of following points in rectwindow w. w=-1 changes global value",
+ "plotpointtype(w,type): change the type of following points in rectwindow w. type -1 corresponds to a dot, larger values may correspond to something else. w=-1 changes highlevel plotting",
"plotrbox(w,dx,dy): if the cursor is at (x1,y1), draw a box with diagonal (x1,y1)-(x1+dx,y1+dy) in rectwindow w (cursor does not move)",
- "plotrecth(w,X=xmin,xmax,expr,{flags=0},{n=0}): plot graph(s) for expr in rectwindow w, where expr is scalar for a single non-parametric plot, and a vector otherwise. If plotting is parametric, its length should be even and pairs of entries give points coordinates. If not, all entries but the first are y-coordinates. Both flags and n are optional. Binary digits of flags mean: 1 parametric plot, 2 recursive plot, 4 do not rescale w, 8 omit x-axis, 16 omit y-axis, 32 omit frame, 64 do not join points. n specifies the number of reference points on the graph (0=use default value). Returns a vector for the bounding box",
+ "plotrecth(w,X=xmin,xmax,expr,{flags=0},{n=0}): plot graph(s) for expr in rectwindow w, where expr is scalar for a single non-parametric plot, and a vector otherwise. If plotting is parametric, its length should be even and pairs of entries give points coordinates. If not, all entries but the first are y-coordinates. Both flags and n are optional. Binary digits of flags mean: 1 parametric plot, 2 recursive plot, 4 do not rescale w, 8 omit x-axis, 16 omit y-axis, 32 omit frame, 64 do not join points, 128 plot both lines and points. n specifies the number of reference points on the graph (0=use default value). Returns a vector for the bounding box",
"plotrecthraw(w,data,{flags=0}): plot graph(s) for data in rectwindow w, where data is a vector of vectors. If plot is parametric, length of data should be even, and pairs of entries give curves to plot. If not, first entry gives x-coordinate, and the other ones y-coordinates. Admits the same optional flags as plotrecth, save that recursive plot is meaningless",
"plotrline(w,dx,dy): if the cursor is at (x1,y1), draw a line from (x1,y1) to (x1+dx,y1+dy) (and move the cursor) in the rectwindow w",
"plotrmove(w,dx,dy): move cursor to position (dx,dy) relative to the present position in the rectwindow w",
diff -pru pari-2.0.12.alpha.ini/src/language/init.c pari-2.0.12.alpha/src/language/init.c
--- pari-2.0.12.alpha.ini/src/language/init.c Fri Nov 6 10:08:56 1998
+++ pari-2.0.12.alpha/src/language/init.c Sat Nov 7 17:55:08 1998
@@ -14,7 +14,7 @@
#endif
/* Variables statiques communes : */
-FILE *outfile, *errfile, *logfile, *infile;
+FILE *pari_outfile, *errfile, *logfile, *infile;
GEN *polun, *polx;
GEN gnil, gzero, gun, gdeux, ghalf, polvar, gi;
GEN gpi=NULL, geuler=NULL, bernzone=NULL;
@@ -161,7 +161,7 @@ init_defaults(int force)
current_psfile = pari_strdup("pari.ps");
current_logfile= pari_strdup("pari.log");
logfile = NULL;
- infile = stdin; outfile = stdout; errfile = stderr;
+ infile = stdin; pari_outfile = stdout; errfile = stderr;
initout(); next_bloc=0;
}
@@ -605,7 +605,7 @@ recover(int flag)
void
err_recover(long numerr)
{
- outfile=stdout; errfile=stderr;
+ pari_outfile=stdout; errfile=stderr;
fprintferr("\n");
if (pariErr->die) pariErr->die();
flusherr();