Problem with __plt_get_axis_arg__.m
Michael Goffioul
michael.goffioul at gmail.com
Mon Dec 3 05:58:31 CST 2007
On 12/3/07, David Bateman <David.Bateman at motorola.com> 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 <michael.goffioul at gmail.com>
* plot/__line__.m: call "__go_line__" with all initial properties instead of
calling "set" after line creation.
More information about the Octave-maintainers
mailing list