Issue with hggroup and zlim

David Bateman David.Bateman at motorola.com
Fri Aug 29 05:37:37 CDT 2008


John W. Eaton wrote:
> On 28-Aug-2008, dbateman wrote:
>
> | John W. Eaton wrote:
> | > 
> | > Looking at __add_datasource__.m, I see
> | > 
> | >   i = 1;
> | >   newargs = {};
> | >   while (i < numel (varargin))
> | >     arg = varargin{i++};
> | >     if (ischar (arg) && length (arg > 1) && strcmpi (arg(2:end),
> | > "datasource"))
> | >       arg = tolower (arg);
> | >       val = varargin{i++};
> | >       if (ischar (val)) 
> | > 	set (h, arg, val);
> | >       else
> | > 	error ("%s: expecting data source to be a string", fcn);
> | >       endif
> | >     else
> | >       newargs{end + 1} = arg;
> | >     endif
> | >   endwhile
> | > 
> | > Should the test in this loop be <= instead of < ?  If so, then newargs
> | > will contain the parent argument and the calls to __line__ in plot3
> | > will need to be modified.  For example, I would propose this change:
> | > 
> | 
> | No as property/value occur in pairs.
>
> 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
>     
> ?
>
> | 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?
>
> | 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?
>
>   
I'd suggest the attached changeset instead.. And yes it should be hline 
and not h in plot3.

D.

-- 
David Bateman                                David.Bateman at motorola.com
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch8487
Url: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080829/bb3be0cd/attachment.ksh 


More information about the Bug-octave mailing list