Mercurial > hg > octave-shane
changeset 7277:0c733917b6c8
[project @ 2007-12-10 20:14:39 by jwe]
author | jwe |
---|---|
date | Mon, 10 Dec 2007 20:14:39 +0000 |
parents | 1e8e64d71e34 |
children | f1c1d837ba9f |
files | scripts/ChangeLog scripts/plot/__line__.m scripts/plot/surface.m |
diffstat | 3 files changed, 22 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2007-12-10 Michael Goffioul <michael.goffioul@gmail.com> + + * plot/__line__.m: Pass initial property/value pairs to __go_line__. + * plot/surface.m: Pass initial property/value pairs to __go_surface__. + 2007-12-10 David Bateman <dbateman@free.fr> * image/image.m: Rewritten to allow trailing properties to be
--- a/scripts/plot/__line__.m +++ b/scripts/plot/__line__.m @@ -47,17 +47,19 @@ print_usage ("line"); endif - h = __go_line__ (p); - + data_args = {}; if (num_data_args > 1) - set (h, "xdata", varargin{1}, "ydata", varargin{2}); + data_args(1:4) = { "xdata", varargin{1}, "ydata", varargin{2} }; if (num_data_args == 3) - set (h, "zdata", varargin{3}); + data_args(5:6) = { "zdata", varargin{3} }; endif endif + other_args = {}; if (nvargs > num_data_args) - set (h, varargin{num_data_args+1:end}); + other_args = varargin(num_data_args+1:end); endif + h = __go_line__ (p, data_args{:}, other_args{:}); + endfunction
--- a/scripts/plot/surface.m +++ b/scripts/plot/surface.m @@ -143,16 +143,17 @@ if (! bad_usage) ## Make a default surface object. - h = __go_surface__ (ax, "xdata", x, "ydata", y, "zdata", z, "cdata", c); - set (h, "facecolor","flat"); + other_args = {}; if (firststring < nargin) - set (h, varargin{firststring:end}); - endif + other_args = varargin(firststring:end); + endif + h = __go_surface__ (ax, "xdata", x, "ydata", y, "zdata", z, "cdata", c, + "facecolor","flat", other_args{:}); - if (! ishold ()) - set (ax, "view", [0, 90], "box", "off", "xgrid", "on", - "ygrid", "on", "zgrid", "on"); - endif - endif + if (! ishold ()) + set (ax, "view", [0, 90], "box", "off", "xgrid", "on", + "ygrid", "on", "zgrid", "on"); + endif + endif endfunction