| Karim BELABAS on Mon, 16 Nov 1998 17:16:03 +0100 (MET) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: ??plotstring |
[Olivier Ramare:]
> Could anyone explain to me the effect of the program
>
> plotinit(0,100,100);
> plotbox(0,100,100);
> plotstring(0,"First");
> plotinit(1,100,100);
> plotbox(1,100,100);
> plotstring(1,"Second");
> psdraw([0,0,0,1,200,0]);
> plotinit(2,100,100);
> plotbox(2,100,100);
> plotstring(2,"Third");
> psdraw([0,0,0,1,200,0,2,0,200]);
>
> ??? Namely, how come the words "Second" and "Third" are where the are ?
> I'm using GP/PARI CALCULATOR Version 2.0.5 (alpha).
Yes: you found a typo in a rarely exercised part of the code. Apply the
following patch (this should apply cleanly to 2.0.6 sources, but it's not
too hard to apply by hand...)
Karim
P.S: Sorry for the delay, I don't read that list too often...
*** src/graph/plotport.c.orig Fri Nov 6 16:08:45 1998
--- src/graph/plotport.c Mon Nov 16 17:10:34 1998
***************
*** 1426,1432 ****
texts[nd[ROt_ST]]=RoSTs(p1);
numtexts[nd[ROt_ST]]=RoSTl(p1);
xtexts[nd[ROt_ST]]=RoSTx(p1)+x0;
! ytexts[nd[ROt_ST]]=RoSTy(p1)+x0;
nd[ROt_ST]++; break;
default: break;
}
--- 1432,1438 ----
texts[nd[ROt_ST]]=RoSTs(p1);
numtexts[nd[ROt_ST]]=RoSTl(p1);
xtexts[nd[ROt_ST]]=RoSTx(p1)+x0;
! ytexts[nd[ROt_ST]]=RoSTy(p1)+y0;
nd[ROt_ST]++; break;
default: break;
}
--
Karim Belabas email: Karim.Belabas@math.u-psud.fr
Dep. de Mathematiques, Bat. 425
Universite Paris-Sud Tel: (00 33) 1 69 15 57 48
F-91405 Orsay (France) Fax: (00 33) 1 69 15 60 19
--
PARI/GP Home Page: http://pari.home.ml.org