octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Growing x11 plot window (was: Flickering movies)


From: Jaroslav Hajek
Subject: Re: Growing x11 plot window (was: Flickering movies)
Date: Thu, 6 Aug 2009 07:30:45 +0200

On Sun, Aug 2, 2009 at 11:14 PM, Ben Abbott<address@hidden> wrote:
> On Jul 31, 2009, at 7:37 AM, Ben Abbott wrote:
>
>> On Jun 27, 2009, at 1:15 PM, Ben Abbott wrote:
>>
>>> On Jun 25, 2009, at 8:38 PM, Ben Abbott wrote:
>>>
>>>> On Jun 25, 2009, at 4:05 PM, Ben Abbott wrote:
>>>>
>>>>> On Thursday, June 25, 2009, at 10:45AM, "Marco Caliari"
>>>>> <address@hidden> wrote:
>>>>>>
>>>>>> Dear maintainers,
>>>>>>
>>>>>> I'm not sure I will describe a bug or just a different behavior, so
>>>>>> I'm
>>>>>> writing to the maintainers' list.
>>>>>> The execution of the following code in Octave 3.0.5
>>>>>>
>>>>>> x = linspace(-1,1);
>>>>>> for i = 1:50
>>>>>> plot(x,i*x.^2)
>>>>>> axis([-1,1,0,50])
>>>>>> pause(0.1)
>>>>>> end
>>>>>>
>>>>>> produces a nice and fluent "movie". In particular, the axis box seems
>>>>>> fixed (it is fixed to my eyes), and only the curve inside moves. With
>>>>>> 3.2.0, I get a very flickering movie, with the axis box clearly
>>>>>> redrawn
>>>>>> at each step. What is strange, moreover, is that if I change
>>>>>>
>>>>>> pause(0.1)
>>>>>>
>>>>>> with
>>>>>>
>>>>>> pause(0.01)
>>>>>>
>>>>>> the axis box changes its dimensions during the loop and so the
>>>>>> illusion of
>>>>>> a movie disappears. I'm using gnuplot 4.2.5.
>>>>>
>>>>> Marco, I see the same effect.
>>>>>
>>>>> This "feature" has been present since Gnuplot allowed the x11 window
>>>>> position and size to be set. Gnuplot allows the x11 window position and 
>>>>> size
>>>>> to be set for gnuplot 4.2.5 and later.
>>>>>
>>>>> Unfortunately, I've been unable to demonstrate this behavior using
>>>>> gnuplot scripts (i.e. no Octave). Thus, I'm inclined to conclude the 
>>>>> problem
>>>>> is with the plot stream octave send's to gnuplot, but have been unable to
>>>>> debug (isolate) the problem.
>>>>>
>>>>> Ben
>>>>
>>>> Marco / others
>>>>
>>>> I've taken a fresh look at this and have found a simple gnuplot script
>>>> that demonstrates (for me) the problem of the figure window changing its
>>>> dimension (nearly always resulting in vertical growth). I've attached a 
>>>> copy
>>>> of the script.
>>>>
>>>> The script is very simple
>>>>
>>>> set terminal x11
>>>> set multiplot; plot sin(x); unset multiplot;
>>>> set multiplot; plot sin(x); unset multiplot;
>>>> set multiplot; plot sin(x); unset multiplot;
>>>> set multiplot; plot sin(x); unset multiplot;
>>>> set multiplot; plot sin(x); unset multiplot;
>>>> set multiplot; plot sin(x); unset multiplot;
>>>> ...
>>>>
>>>> My experience is that the x11 figure window's growth (or change in
>>>> dimension) is related to timing. A sufficiently fast computer may not
>>>> produce the problem.
>>>>
>>>> In any event, if anyone is running gnuplot 4.2.5 or above, I'd
>>>> appreciate it if they'd run this script and report back what happens. Just
>>>> type ...
>>>>
>>>>        gnuplot --persist "debug.gp"
>>>>
>>>> ... or run gnuplot and type
>>>>
>>>>        load "debug.gp"
>>>>
>>>> Thanks,
>>>> Ben
>>>
>>> I've produced a initial changeset that attempt to work around the
>>> problem.
>>>
>>> When there are multiple axes or, at least one image objects, gnuplot's
>>> multiplot is set (meaning the growth problem remains). For other plots,
>>> multiplot is unset (meaning the growth problem is absent).
>>>
>>> I've tried gnuplot 4.2.3, 4.2.5, and the developers 4.3.0. I see no new
>>> problems., and only see a growing window for running 4.2.5 for 4.3.0, and
>>> when multiplot is set.
>>>
>>> The figure window growth problem remains obvious for me when running the
>>> colorbar demos.
>>>
>>> Ben
>>>
>>> <changeset.patch>
>>
>> Update.
>>
>> The problem with the growing window has been fixed in gnuplot's sources.
>>
>>
>>  
>> http://sourceforge.net/tracker/?func=detail&aid=2812476&group_id=2055&atid=102055
>>
>> I found a bug with the prior changeset when printing. The attached
>> resolves that.
>>
>> This change is a bit hacky. I am only able to avoid a flicking x11 window
>> for a plot with a single axes object and no image objects.
>>
>> If there are no suggestions for a better implementation, I'll push later
>> today.
>>
>> Ben
>>
>> <changeset.patch>
>
> I've pushed this change.
>
> Ben
>
>
>

I transplanted it to 3.2.x

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]