bugGNU Octave - Bugs: bug #31522, Flickering movies

 
 

bug #31522: Flickering movies

Submitted by:  Marco Caliari <caliari>
Submitted on:  Tue 02 Nov 2010 08:07:03 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Performance
Status: FixedAssigned to: David Bateman <dbateman>
Originator Name: Marco CaliariOpen/Closed: Closed
Release: 3.3.53Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission 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>
Project MemberIn charge of this item.
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>
Project 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>
Project MemberIn charge of this item.
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>
Project 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>
Project 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>
Project Administrator
Tue 02 Nov 2010 08:07:03 AM UTC, original submission:

Dear all,

I noticed that the following

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>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 07 Nov 2010 09:56:49 PM UTCdbatemanStatusConfirmed=>Fixed
      Assigned toNone=>dbateman
      Open/ClosedOpen=>Closed
    Wed 03 Nov 2010 03:02:20 PM UTCbpabbottOriginator Name=>Marco Caliari
    Wed 03 Nov 2010 12:10:36 AM UTCrik5Carbon-Copy-=>Added -unavailable-
    Tue 02 Nov 2010 05:24:47 PM UTCrik5StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1