Issue with hggroup and zlim
dbateman
dbateman at free.fr
Thu Aug 28 15:58:45 CDT 2008
John W. Eaton wrote:
>
> I'm confused. Does __add_datasource__ require that varargin is a list
> of property value pairs? If yes, then why not write the loop as
>
> for i = 1:2:numel (varargin)
> key = varargin{i};
> val = varargin{i+1}
> if (length (key > 1) && strcmpi (key(2:end), "datasource"))
> if (ischar (val))
> set (h, key, val);
> else
> error ("%s: expecting data source to be a string", fcn);
> endif
> else
> newargs(end+1:end+2) = {key, val};
> endif
> endwhile
>
> ?
>
It extracts prop/val pairs with the prop ending in "datasource". However,
the args that are returned don't have to be prop/val pairs.
> | However varargin{i++} should read
> | varargin{++i} or i should be initialized to 0.
>
> I don't see how that can be "or". Do you mean "and", and that i++
> should be switched to ++i in both cases?
>
If i=0 initially then varargin {i++} and > will work. Otherwise i=1
initially and varargin{++i} with the loop test changed to by -1 will work.
>
> | As for the change in plot3.m
> | this is incorrect as the explicit reparenting to the hggroup is needed.
> Your
> | second reparenting will just override that.
>
> OK.
>
> What about the call to __add_line_series__? Should the first argument
> be hline instead of h?
>
> If I make the attached changes, I see this:
>
> octave:1> z = [0:0.05:5]; hold on; hg = hggroup();
> octave:2> h = plot3 (z, exp(2i*pi*z),'parent',hg);
> octave:3> h = plot3 (z, exp(2i*pi*z),'parent',hg);
> Segmentation fault
>
> so the first call works, but the second fails. It appears to be an
> infinite recursion:
>
Can't test now, as I'm not on my development. I'll look tomorrow and propose
something.
D.
--
View this message in context: http://www.nabble.com/Issue-with-hggroup-and-zlim-tp19202633p19209018.html
Sent from the Octave - Bugs mailing list archive at Nabble.com.
More information about the Bug-octave
mailing list