On 2009-11-13 22:32-0500 David Sagan wrote:

> Hello:
>
> I am using plplot5.9.5 on Linux [Scientific Linux SL release 4.5 
> (Beryllium)]. I am not able to vary
> the window size for tk when I run the x31c.c example. I am trying to do this 
> by changing the xleng1
> and xleng2 variables and recompiling. The X window works fine. It is just tk 
> that is the problem. I
> am always getting a very large window with the same width as the screen. 
> Anyone has any suggestions?
>
> Looking at this with a debugger, I see that launch_server in tk.c never uses 
> the window size info
> from plspage! I can get around this by using plsetopt("geometry", geom) but 
> this definitely lookks
> like a bug.

I wouldn't call this a bug.  Instead, by historical design our device
drivers have quite a bit of freedom about how they interpret plspage.  To
quote from
http://plplot.sourceforge.net/docbook-manual/plplot-html-5.9.5/plspage.html,

"Not all parameters are recognized by all drivers and the interpretation is
device-dependent."

For example, in the -dev tk case, if you look at opt-geo in plargs.c, there
is a remark that "The TK driver uses the geometry string directly" with
appropriate code to deal with that case.  I am pretty sure that -dev tk was
historically implemented to take advantage of the plspage freedom to specify
geometry a different way because -dev tk is based on X, and X has an
extremely general way to interpret geometry strings (see man X).  Until
recently (revision 10478) the plplot interpretation of geometry was much
more limited, but now it also tries to emulate the generality of the X
interpretation (e.g., with negative offsets allowed).  So eventually, we
will probablh want to switch to the plplot interpretation for -dev tk as
well.  Until then, however, you have found the correct workaround. With -dev
tk, plspage is not an effective way to set geometry. Instead, use the
command-line option -geometry or use plsetopt to specify geometry.  Both
those result in opt_geo getting called which implements the special way of
setting geometry for -dev tk.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to