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.
|
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.
|
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.
|
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.
|
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
|