[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: plot and image demos (growing window)
From: |
Daniel J Sebald |
Subject: |
Re: plot and image demos (growing window) |
Date: |
Fri, 29 May 2009 22:01:27 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020 |
Ben Abbott wrote:
On May 29, 2009, at 2:05 AM, Daniel J Sebald wrote:
Ben Abbott wrote:
On May 29, 2009, at 1:35 AM, Daniel J Sebald wrote:
Ben Abbott wrote:
On May 29, 2009, at 12:58 AM, Jaroslav Hajek wrote:
On Fri, May 29, 2009 at 2:09 AM, Ben Abbott <address@hidden>
wrote:
On May 28, 2009, at 5:25 PM, John W. Eaton wrote:
On 28-May-2009, Ben Abbott wrote:
| This looks like a feature of gnuplot. When a subsequent "set
term
| x11 ..." command is encountered before the prior plot-
stream completes
| there appears to be some unintended interaction between
gnuplot and
| x11 which causes the window to grow.
|
| For example, try ...
|
| for n=1:100; plot(1:1000); drawnow; end
|
| Adding the command "unset mouse" the the beginning of the
plot- stream
| eliminates the problem. Shall a "unset mouse" be added to
be beginning
| of each plot-stream? (changeset attached) ... If desired a
"set mouse"
| may added at the end of the plot-stream. Unfortunately, I
don't know
| of a good way to detect the state of "set/unset mouse". We could
| obtain the x11 window ID and ask x11 for the window size while
| toggling the mouse state, but is it worth the hassle?
No, I don't think it is worth it.
Even unset mouse/set mouse might not be worth it. Is there an
easy
way to demonstrate this bug with a simple gnuplot script? If
so, then
I'd say report it as a bug in gnuplot and we should not bother
to work
around it in Octave.
jwe
Octave doesn't acquire the window position. I'd hoped to do so, but
haven't developed a proper solution.
Oh, I thought that had been fixed soon after the discussion a few months back. Well,
certainly if you can point to something flawed in gnuplot causing the expanding plot
window then, by all means, file a bug report with the gnuplot development site. In
addition, if the "right" way of dealing with this is to capture the X11 window
position, then the solution may (I repeat, may) be easier than you imagine.
I think what you described above about inquiring X11 window size from the X11
id is perhaps the thing to do. (But not the method for mouse on, mouse off.)
I'm thinking back on the discussion and I recall the motivating factor being
that as part of the matryoshka pointers we wanted to include the window
position coordinates. If someone repositions the plot with a mouse, then we
want that to be dynamically updated in the parameters, I'm guessing.
To get the X11 Window ID, consider creating the X11 window first inside Octave (as an
invisible window), keep track of that ID behind the scenes, then pass the ID into
gnuplot. gnuplot has a feature that will accept an X11 window ID then use the associated
window as a wrapper for the plot. With gnuplot comes a "gpdemos.tcl" that
illustrates the concept in TCL.
Is there some way in the Octave code to turn the mousing off (i.e.,
unset mouse) before querying for the X11 position/size?
The only way would be to ...
(1) get the window size
(2) set mouse
(3) get the window size
(4) unset mouse
(5) get the window size
(6) Determine if the mouse was originally set or unset
(7) Return the mouse to its original state
Such an implementation is kludgy :-(
I agree with you and John; not a good solution. However, if one has the X11
window ID, can't the mouse on/off be determined from X11 resources directly?
However the greater difficulty is how to obtain the x11 window position
and size reliably for Unix
See above.
and Windows.
Windows doesn't do X11, does it?
Dan
- Re: plot and image demos (growing window), (continued)
- Re: plot and image demos (growing window), Ben Abbott, 2009/05/28
- Re: plot and image demos (growing window), John W. Eaton, 2009/05/28
- Re: plot and image demos (growing window), Ben Abbott, 2009/05/28
- Re: plot and image demos (growing window), Jaroslav Hajek, 2009/05/29
- Re: plot and image demos (growing window), Ben Abbott, 2009/05/29
- Re: plot and image demos (growing window), Daniel J Sebald, 2009/05/29
- Message not available
- Re: plot and image demos (growing window), Daniel J Sebald, 2009/05/29
- Re: plot and image demos (growing window), Ben Abbott, 2009/05/29
- Re: plot and image demos (growing window), John W. Eaton, 2009/05/29
- Re: plot and image demos (growing window), Ben Abbott, 2009/05/29
- Re: plot and image demos (growing window),
Daniel J Sebald <=
- Re: plot and image demos (growing window), Ben Abbott, 2009/05/29
Message not available
Re: plot and image demos (conversion to character), Ben Abbott, 2009/05/28
Re: plot and image demos, Rik, 2009/05/27