From: Alan W. I. <ir...@be...> - 2001-10-26 20:02:33
|
Can't you use plgpage or plgdidev (these routines along with plgchr are badly documented so that is why I am guessing about the coordinates) to get the plotting box size in the same coordinates as plgchr? If so, then the ratio of results returned for character size and plotting box size can be used to convert character size to world coordinates. Once you have character size in terms of world coordinates you have complete driver-independent control of where the characters in your legend are placed. Alan email: ir...@be... phone: 250-727-2902=09FAX: 250-721-7715 snail-mail: Dr. Alan W. Irwin Department of Physics and Astronomy, University of Victoria, P.O. Box 3055, Victoria, British Columbia, Canada, V8W 3P6 __________________________ Linux-powered astrophysics __________________________ On Fri, 26 Oct 2001, Joao Cardoso wrote: > On Friday 26 October 2001 00:49, Alan W. Irwin wrote: > | On Thu, 25 Oct 2001, Joao Cardoso wrote: > | > On Thursday 18 October 2001 18:14, Alan W. Irwin wrote: > | > | On Thu, 18 Oct 2001, [iso-8859-1] Jo=E3o Cardoso wrote: > | > | > On Thursday 18 October 2001 01:32, Alan W. Irwin wrote: > | > > | > ... > | > > | > | FURTHER TESTS.... > | > | > | > | I also ran the script for the png driver this morning, and there ar= e > | > | some problems (for real this time ....;-)) with the octave stuff in > | > | that case. There are severe size problems with the legends for all > | > | plots. > | > > | > As it didn't happen for me, I was assuming that the fault was yours. > | > | Note my comment was for the png driver only. > > I have checked it, and the tk and ps drivers are OK (possibly others too)= =2E > The xwin and png drivers have the problem. Try the "p1" octave demo, and = you > will see it. > > As you say bellow, the problem is getting the correct character size. Oct= ave > just don't know what driver it is working on, it just looks at the value > returned from plgchar(): > > octave:1> fig(1,"xwin"); > octave:2> [a b]=3Dplgchr > a =3D 2.0000 > b =3D 2.0000 > octave:3> fig(2,"tk"); > octave:4> [a b]=3Dplgchr > a =3D 4.4449 > b =3D 4.4449 > octave:5> fig(3,"ps","po.ps"); > octave:6> [a b]=3Dplgchr > a =3D 4.4436 > b =3D 4.4436 > octave:7> fig(4,"png","po.png"); > octave:8> [a b]=3Dplgchr > a =3D 1.9950 > b =3D 1.9950 > octave:9> > > So, you see, the returned value is different for each driver. Octave has = no > other way to know the character size. There is no other API entry to know > this, I think. > > What does others think? To summarize: the problem is to know the size of = the > bounding box of a plplot string, knowing the string length, to enclose it= in > a box. This has to be done using the API calls. > > Joao > > PS-I will leave to a short holiday now, don't expect answers to the > (eventual) thread. > > > _______________________________________________ > Plplot-devel mailing list > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-devel > |