plot and image demos (growing window)
Ben Abbott
bpabbott at mac.com
Thu May 28 16:09:40 CDT 2009
On May 27, 2009, at 6:02 PM, Ben Abbott wrote:
> On May 27, 2009, at 12:48 PM, John W. Eaton wrote:
>
>> Using the current development version I just did
>>
>> more off
>> rundemos plot
>> rundemos image
>>
>> and stepped through all the demos and everything looks good except
>> for the following:
>>
>> * the demo for comet causes the plot window to grow in the vertical
>> dimension (hmm, this happened twice, but then it seems to not be
>> 100% repeatable).
>>
>> * the first surfl demo, the contrast demo, and the first imshow demo
>> all showed the warning
>>
>> warning: range error for conversion to character value
>>
>> but that only happened when running all the demos with rundemos
>> plot followed by rundemos image, not when running them
>> individually.
>>
>> * sombrero produced warnings from gnuplot
>>
>> multiplot> et origin 0, 0
>> ^
>> line 1092: invalid command
>>
>> Press <enter> to continue:
>> multiplot> u
>> nset view;
>> ^
>> line 1092: invalid command
>>
>> but this only happened once (?!). Other runs of this demo seemed
>> to work OK. So I don't know what might have caused problems
>> sending data to gnuplot.
>>
>> Does anyone else see these problems? Any clues about what could be
>> causing the warnings? Is something sometimes not reset properly when
>> a new figure is created?
>>
>> jwe
>
> I'd thought the growing window had been fixed. I had encountered
> this when adding support for the figure position. Unfortunately,
> each time the position and size of the figure was specified via
> gnuplot's "set term ..." command the window had some probability of
> growing by one character height. The solution was to only specify
> the window position and size when the figure was created (i.e. only
> for the original "set term ...")
>
> If I recall correctly you are running gnuplot 4.2.5. Perhaps this
> version of gnuplot behaves a bit different than 4.2.4/4.2.3?
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?
Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changeset.patch
Type: application/octet-stream
Size: 1218 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20090528/4c650a22/attachment.obj
-------------- next part --------------
More information about the Octave-maintainers
mailing list