octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with __plt_get_axis_arg__.m


From: John W. Eaton
Subject: Re: Problem with __plt_get_axis_arg__.m
Date: Mon, 03 Dec 2007 14:42:55 -0500

On  3-Dec-2007, David Bateman wrote:

| Michael Goffioul wrote:
| > On 12/3/07, David Bateman <address@hidden> wrote:
| >   
| >> Looking in the code in
| >>
| >> static octave_value
| >> make_graphics_object (const std::string& go_name,
| >>              const octave_value_list& args)
| >>
| >> it seems it is supposed to do that already. Something like
| >>
| >> h = __go_patch__ (gca(), "Facecolor", "Red")
| >>
| >> seems to work fine
| >>     
| >
| > Here's an example for the line case.
| >
| > Michael.
| >
| > Index: scripts/plot/__line__.m
| > ===================================================================
| > RCS file: /cvs/octave/scripts/plot/__line__.m,v
| > retrieving revision 1.4
| > diff -c -p -r1.4 __line__.m
| > *** scripts/plot/__line__.m     12 Oct 2007 21:27:24 -0000      1.4
| > --- scripts/plot/__line__.m     3 Dec 2007 11:53:55 -0000
| > *************** function h = __line__ (p, varargin)
| > *** 47,63 ****
| >       print_usage ("line");
| >     endif
| >
| > !   h = __go_line__ (p);
| > !
| >     if (num_data_args > 1)
| > !     set (h, "xdata", varargin{1}, "ydata", varargin{2});
| >       if (num_data_args == 3)
| > !       set (h, "zdata", varargin{3});
| >       endif
| >     endif
| >
| >     if (nvargs > num_data_args)
| > !     set (h, varargin{num_data_args+1:end});
| >     endif
| >
| >   endfunction
| > --- 47,65 ----
| >       print_usage ("line");
| >     endif
| >
| > !   data_args = {};
| >     if (num_data_args > 1)
| > !     data_args(1:4) = { "xdata", varargin{1}, "ydata", varargin{2} };
| >       if (num_data_args == 3)
| > !       data_args(5:6) = { "zdata", varargin{3} };
| >       endif
| >     endif
| >
| > +   other_args = {};
| >     if (nvargs > num_data_args)
| > !     other_args = varargin(num_data_args+1:end);
| >     endif
| >
| > +   h = __go_line__ (p, data_args{:}, other_args{:});
| > +
| >   endfunction
| >
| >
| > 2007-12-03  Michael Goffioul <address@hidden>
| >
| >     * plot/__line__.m: call "__go_line__" with all initial properties 
instead of
| >     calling "set" after line creation.
| >
| >   
| This looks good. Why not do the same for all functions if it is faster..

Seems fine to me.  I would certainly consider a patch.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]