[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #37913] subplot with copyobj inconsistent
From: |
Pantxo Diribarne |
Subject: |
[Octave-bug-tracker] [bug #37913] subplot with copyobj inconsistent |
Date: |
Sat, 15 Dec 2012 13:57:00 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0 |
Follow-up Comment #4, bug #37913 (project octave):
I have added a listener to position and ztick properties to see how much times
they are modified after the axes has been created.
diff -r 06832c90ae7d scripts/plot/struct2hdl.m
--- a/scripts/plot/struct2hdl.m Fri Dec 14 16:03:50 2012 -0800
+++ b/scripts/plot/struct2hdl.m Sat Dec 15 14:34:56 2012 +0100
@@ -172,7 +172,10 @@
endif
endfor
h = axes (propval{:}, "parent", par);
-
+ disp ("add listener to position and ztick property")
+ markchanged = @(h, foobar, name) set (h, "userdata", [get(h,"userdata");
{name}]);
+ addlistener (h, "position", {markchanged, "position"})
+ addlistener (h, "ztick", {markchanged, "ztick"})
if (isfield (s.properties, "__plotyy_axes__"))
plty = s.properties.__plotyy_axes__;
addproperty ("__plotyy_axes__", h, "any");
If I run the example below I can see that in gnuplot ztick is modified once,
as expected, but position is never modified. In fltk ztick is also modifed
once but position is modifed 15 times.
close all
graphics_toolkit gnuplot;
ax1 = subplot (1, 1, 1);
ax2 = copyobj (ax1, gcf);
disp ("gnuplot")
nztick = length (find (strcmp (get (ax2, "userdata"), "ztick")))
npos = length (find (strcmp (get (ax2, "userdata"), "position")))
close all
graphics_toolkit fltk;
ax1 = subplot (1, 1, 1);
ax2 = copyobj (ax1, gcf);
disp ("fltk")
nztick = length (find (strcmp (get (ax2, "userdata"), "ztick")))
npos = length (find (strcmp (get (ax2, "userdata"), "position")))
Wild guess: in gnuplot position is updated only if the requested value is
different from the current one?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?37913>
_______________________________________________
Message posté via/par Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #37913] subplot with copyobj inconsistent, Muhali, 2012/12/13
- [Octave-bug-tracker] [bug #37913] subplot with copyobj inconsistent, Pantxo Diribarne, 2012/12/13
- [Octave-bug-tracker] [bug #37913] subplot with copyobj inconsistent, Ben Abbott, 2012/12/14
- [Octave-bug-tracker] [bug #37913] subplot with copyobj inconsistent, Ben Abbott, 2012/12/14
- [Octave-bug-tracker] [bug #37913] subplot with copyobj inconsistent, Pantxo Diribarne, 2012/12/15
- [Octave-bug-tracker] [bug #37913] subplot with copyobj inconsistent,
Pantxo Diribarne <=
- [Octave-bug-tracker] [bug #37913] subplot with copyobj inconsistent, Ben Abbott, 2012/12/15
- [Octave-bug-tracker] [bug #37913] subplot with copyobj inconsistent, Pantxo Diribarne, 2012/12/15
- [Octave-bug-tracker] [bug #37913] subplot with copyobj inconsistent, Ben Abbott, 2012/12/16
- [Octave-bug-tracker] [bug #37913] subplot with copyobj inconsistent, Pantxo Diribarne, 2012/12/16
- [Octave-bug-tracker] [bug #37913] subplot with copyobj inconsistent, Ben Abbott, 2012/12/16