# HG changeset patch # User jwe # Date 1197396906 0 # Node ID 5e90111a28b35cc36564a49a609664e14409fffe # Parent de593fd63ecfbcc13d2bf6ddaec320a639f68b8e [project @ 2007-12-11 18:13:34 by jwe] diff -r de593fd63ecf -r 5e90111a28b3 scripts/ChangeLog --- a/scripts/ChangeLog Tue Dec 11 18:10:19 2007 +0000 +++ b/scripts/ChangeLog Tue Dec 11 18:15:06 2007 +0000 @@ -3,6 +3,14 @@ * plot/__plt2vs__.m, plot/__plt2sv__.m: New functions. * plot/__plt2__.m: Handle scalar-vector and vector-scalar cases. +2007-12-11 Kai Habel + + * plot/slice.m: Remove unused variable, set xgrid, ygrid, and + zgrid to "on" and box to "off" for used axes. + + * plot/__go_draw_axes__.m, plot/plot3.m, plot/ribbon.m, + plot/slice.m: Use size_equal(var1,var2,...) when possible. + 2007-12-11 David Bateman * miscelleaneous/fullfile.m: Ignore empty arguments. diff -r de593fd63ecf -r 5e90111a28b3 scripts/plot/__go_draw_axes__.m --- a/scripts/plot/__go_draw_axes__.m Tue Dec 11 18:10:19 2007 +0000 +++ b/scripts/plot/__go_draw_axes__.m Tue Dec 11 18:15:06 2007 +0000 @@ -844,7 +844,7 @@ err = true; endif elseif (ismatrix (xdat) && ismatrix (ydat) && ismatrix (zdat)) - if (! (size_equal (xdat, ydat) && size_equal (xdat, zdat))) + if (! size_equal (xdat, ydat, zdat)) err = true; endif else diff -r de593fd63ecf -r 5e90111a28b3 scripts/plot/plot3.m --- a/scripts/plot/plot3.m Tue Dec 11 18:10:19 2007 +0000 +++ b/scripts/plot/plot3.m Tue Dec 11 18:15:06 2007 +0000 @@ -167,7 +167,7 @@ endif endif - if (! size_equal (x, y) || ! size_equal (x, z)) + if (! size_equal (x, y, z)) error ("plot3: x, y, and z must have the same shape"); endif @@ -211,7 +211,7 @@ endif endif - if (! size_equal (x, y) || ! size_equal (x, z)) + if (! size_equal (x, y, z)) error ("plot3: x, y, and z must have the same shape"); endif @@ -275,7 +275,7 @@ endif endif - if (! size_equal (x, y) || ! size_equal (x, z)) + if (! size_equal (x, y, z)) error ("plot3: x, y, and z must have the same shape"); endif diff -r de593fd63ecf -r 5e90111a28b3 scripts/plot/ribbon.m --- a/scripts/plot/ribbon.m Tue Dec 11 18:10:19 2007 +0000 +++ b/scripts/plot/ribbon.m Tue Dec 11 18:15:06 2007 +0000 @@ -55,7 +55,7 @@ [x, y] = meshgrid (x, y); endif else - if (! all (size (x) == size (y))) + if (! size_equal(x, y)) error ("ribbon: in case of matrices, X and Y must have same size") endif endif diff -r de593fd63ecf -r 5e90111a28b3 scripts/plot/slice.m --- a/scripts/plot/slice.m Tue Dec 11 18:10:19 2007 +0000 +++ b/scripts/plot/slice.m Tue Dec 11 18:15:06 2007 +0000 @@ -72,7 +72,6 @@ function h = slice (varargin) method = "linear"; - extrapval = NA; nargs = nargin; if (ischar (varargin{end})) @@ -100,7 +99,7 @@ z = varargin{3}; if (all ([isvector(x), isvector(y), isvector(z)])) [x, y, z] = meshgrid (x, y, z); - elseif (ndims (x) == 3 && size_equal (x, y) && size_equal (x, z)) + elseif (ndims (x) == 3 && size_equal (x, y, z)) ## Do nothing. else error ("slice: X, Y, Z size mismatch") @@ -114,7 +113,7 @@ if (any ([isvector(sx), isvector(sy), isvector(sz)])) have_sval = true; - elseif (ndims(sx) == 2 && size_equal (sx, sy) && size_equal (sx, sz)) + elseif (ndims(sx) == 2 && size_equal (sx, sy, sz)) have_sval = false; else error ("slice: dimensional mismatch for (XI, YI, ZI) or (SX, SY, SZ)"); @@ -160,11 +159,12 @@ endif else vi = interp3 (x, y, z, v, sx, sy, sz); - tmp(sidx++) = surface (sx, sy, sz, vi); + tmp = surface (sx, sy, sz, vi); endif if (! ishold ()) - set (ax, "view", [-37.5, 30.0]); + set (ax, "view", [-37.5, 30.0], "box", "off", "xgrid", "on", + "ygrid", "on", "zgrid", "on"); endif if (nargout > 0) diff -r de593fd63ecf -r 5e90111a28b3 scripts/plot/surface.m --- a/scripts/plot/surface.m Tue Dec 11 18:10:19 2007 +0000 +++ b/scripts/plot/surface.m Tue Dec 11 18:15:06 2007 +0000 @@ -92,7 +92,7 @@ error ("surface: rows (z) must be the same as length (y) and columns (z) must be the same as length (x)"); endif elseif (ismatrix (x) && ismatrix (y) && ismatrix (z)) - if (! (size_equal (x, y) && size_equal (x, z))) + if (! size_equal (x, y, z)) error ("surface: x, y, and z must have same dimensions"); endif else @@ -111,7 +111,7 @@ error ("surface: rows (z) must be the same as length (y) and columns (z) must be the same as length (x)"); endif elseif (ismatrix (x) && ismatrix (y) && ismatrix (z)) - if (! (size_equal (x, y) && size_equal (x, z))) + if (! size_equal (x, y, z)) error ("surface: x, y, and z must have same dimensions"); endif else