[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with __plt_get_axis_arg__.m
From: |
David Bateman |
Subject: |
Re: Problem with __plt_get_axis_arg__.m |
Date: |
Mon, 03 Dec 2007 17:41:15 +0100 |
User-agent: |
Thunderbird 1.5.0.7 (X11/20060921) |
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..
D.
--
David Bateman address@hidden
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
- Re: Problem with __plt_get_axis_arg__.m, (continued)
- Re: Problem with __plt_get_axis_arg__.m, David Bateman, 2007/12/01
- Re: Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/02
- Re: Problem with __plt_get_axis_arg__.m, David Bateman, 2007/12/02
- Re: Problem with __plt_get_axis_arg__.m, David Bateman, 2007/12/02
- Re: Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m, David Bateman, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m, David Bateman, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m,
David Bateman <=
- Re: Problem with __plt_get_axis_arg__.m, John W. Eaton, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/04
- Re: Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/06
- Re: Problem with __plt_get_axis_arg__.m, David Bateman, 2007/12/10
- Re: Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/10
- Re: Problem with __plt_get_axis_arg__.m, David Bateman, 2007/12/10
- Re: Problem with __plt_get_axis_arg__.m, John W. Eaton, 2007/12/10
- Re: Problem with __plt_get_axis_arg__.m, John W. Eaton, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m, Michael Goffioul, 2007/12/03
- Re: Problem with __plt_get_axis_arg__.m, David Bateman, 2007/12/03