bugGNU Octave - Bugs: bug #31522, Flickering movies

 
 

bug #31522: Flickering movies

Submitter:  Marco Caliari <caliari>
Submitted:  Tue 02 Nov 2010 08:07:03 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Performance
Status:  Fixed Assigned to:  dbateman
Originator Name:  Marco Caliari Open/Closed:  * Closed
Release:  * 3.3.53 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 07 Nov 2010 09:56:49 PM UTC, comment #6: 

The changeset

http://hg.savannah.gnu.org/hgweb/octave/rev/9f080d23396f

and the minor fix to it

http://hg.savannah.gnu.org/hgweb/octave/rev/91c606a68693

add the feature in the manner I discussed and appears to partially fix this problem.

Note that even though the line doesn't flicker, the legend does and this is due to the call to "drawnow" in the legend function. This was necessary as the position and outerposition properties didn't seem to be up to date till the figure was actually drawn and we need these to be able to position the legend correctly. However, Ben made some changes in the activeposition code since this was written that appears to make this call to drawnow unnecessary. So I removed this call in

http://hg.savannah.gnu.org/hgweb/octave/rev/abc0c6b0a4c4

and this bug appears to be entirely fixed. so I'm closing it.

D.

David Bateman <dbateman>
Group Member
Thu 04 Nov 2010 12:48:32 AM UTC, comment #5: 

The only potential problem I see is this will prevent the gnuplot backend from selecting a legend object with a click of the mouse. However, I am skeptical it is practical to make objects selectable for the gnuplot backend, but I thought I'd mention it now ... rather than later.

In any event, this change looks ok to me.

Ben Abbott <bpabbott>
Group Member
Wed 03 Nov 2010 09:16:00 PM UTC, comment #4: 

Currently only one axes is really used with the gnuplot backend (see the recent comments in the bug report https://savannah.gnu.org/bugs/?30461). However in the frontend there is an undrawn access containing the legend. It would be easy to fix this bug report with something like

diff --git a/scripts/plot/gnuplot_drawnow.m b/scripts/plot/gnuplot_drawnow.m
--- a/scripts/plot/gnuplot_drawnow.m
+++ b/scripts/plot/gnuplot_drawnow.m
@@ -302,8 +302,12 @@
     fputs (plot_stream, "unset multiplot;\n");
     flickering_terms = {"x11", "windows", "wxt", "dumb"};
     if (! any (strcmp (term, flickering_terms))
-        || numel (findall (h, "type", "axes")) > 1
+        || (numel (findall (h, "type", "axes")) -
+            sum (strcmp (get (findall (h, "type", "axes"), "tag"), "legend"))) > 1
         || numel (findall (h, "type", "image")) > 0)
+
+
+
       fprintf (plot_stream, "%s\n", term_str);
       if (nargin == 5)
         if (! isempty (file))

Though if I add the additional axis for the legend I was proposing to add to allow legend to work properly with the plotyy function, then the above won't be possible in generally. What I therefore propose is to apply something like the above patch, and limit the creation of an additional gnuplot axis for the legend to the cases where the legend refers to plot from different axes; a case that would already be broken for this bug report in any case.

D.

David Bateman <dbateman>
Group Member
Wed 03 Nov 2010 03:02:20 PM UTC, comment #3: 

David's changeset is the one below.

http://hg.savannah.gnu.org/hgweb/octave/rev/e81914f3921f

My understanding is that a gnuplot based figure window will flicker (and may actually grow vertically in size) if multiplot is toggled on and off, which is necessary if more than one axes exists. I also recall that multiplot needs to be toggled off in order to allow for mouse actions.

My understanding is that David plans to create an additional hidden axis to hold the legend. This will allow the legend to include objects from different parent axes.

So there may be an unavoidable conflict. If so we'll have to choose between (1) flickering windows for figures multiple axes or legends, (2) legends are not able to include objects with different parents, or (3) mouse actions won't work for plots with multiple axes.

So as not to mislead, and if my memory is to be trusted, movies with multiple axes would flicker prior to David's changeset.

Ben Abbott <bpabbott>
Group Member
Wed 03 Nov 2010 12:10:36 AM UTC, comment #2: 

Using Mercurial's bisect command I traced the changeset which introduced the flicker to the one below:

changeset:   10995:e81914f3921f
user:        David Bateman <dbateman@free.fr>
date:        Sat Sep 18 22:30:41 2010 +0200
summary:     Update legend code to support fltk (fixes #29348 and partially fixes #30461)

I'm adding David to the CC list for this issue.

Rik <rik5>
Group administrator
Tue 02 Nov 2010 05:24:47 PM UTC, comment #1: 

I can confirm this on a recent tip (30bcd1aa9f09) with gnuplot 4.4.0.  The issue does not exist for 3.2.3 and 3.2.4.

Interestingly, with the backend set to fltk the legend label also flickers, although the axes do not.

Rik <rik5>
Group administrator
Tue 02 Nov 2010 08:07:03 AM UTC, original submission:  

Dear all,

I noticed that the following


x = linspace(0,1,100);
for i = 1:10
  plot(x,x.^i);
  legend('powers');
  pause(0.2);
end


produces "flickering movies" (as described here http://www-old.cae.wisc.edu/pipermail/octave-maintainers/2009-June/012720.html). Everything is fine with 3.3.51, or if I remove the legend. I'm using Gnuplot 4.4.2.

Best regards,

Marco

Marco Caliari <caliari>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dbateman (Posted a comment)
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by caliari (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-11-07 dbateman StatusConfirmed Fixed
        Assigned toNone dbateman
        Open/ClosedOpen Closed
    2010-11-03 bpabbott Originator Name Marco Caliari
    2010-11-03 rik5 Carbon-Copy- Added -email is unavailable-
    2010-11-02 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code