Mercurial > octave
changeset 26831:677764865056 stable
Accept 4-input form for quiver3 (bug #55570).
* quiver3.m: Change documentation to remove incorrect 3-input calling form.
Document 4-input calling form.
* __quiver__.m: Change input validation to extract 'z' data as first argument
of 4-input calling form to quiver3.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 03 Mar 2019 15:08:19 -0800 |
parents | f7b10bd40045 |
children | 10c9f39d0d17 e07ea25d58f5 |
files | scripts/plot/draw/private/__quiver__.m scripts/plot/draw/quiver3.m |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/draw/private/__quiver__.m Sun Mar 03 12:56:12 2019 +0100 +++ b/scripts/plot/draw/private/__quiver__.m Sun Mar 03 15:08:19 2019 -0800 @@ -43,14 +43,15 @@ ioff = 3; if (nargin < (6 + is3d) || firstnonnumeric < (6 + is3d)) + if (is3d) + z = varargin{ioff++}; + endif u = varargin{ioff++}; v = varargin{ioff++}; if (is3d) w = varargin{ioff++}; - [x, y, z] = meshgrid (1:columns (u), 1:rows (u), 1:max (size (w))); - else - [x, y] = meshgrid (1:columns (u), 1:rows (u)); endif + [x, y] = meshgrid (1:columns (u), 1:rows (u)); if (nargin >= ioff && isnumeric (varargin{ioff}) && isscalar (varargin{ioff})) autoscale = varargin{ioff++};
--- a/scripts/plot/draw/quiver3.m Sun Mar 03 12:56:12 2019 +0100 +++ b/scripts/plot/draw/quiver3.m Sun Mar 03 15:08:19 2019 -0800 @@ -17,8 +17,8 @@ ## <https://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {} {} quiver3 (@var{u}, @var{v}, @var{w}) ## @deftypefnx {} {} quiver3 (@var{x}, @var{y}, @var{z}, @var{u}, @var{v}, @var{w}) +## @deftypefn {} {} quiver3 (@var{z}, @var{u}, @var{v}, @var{w}) ## @deftypefnx {} {} quiver3 (@dots{}, @var{s}) ## @deftypefnx {} {} quiver3 (@dots{}, @var{style}) ## @deftypefnx {} {} quiver3 (@dots{}, "filled") @@ -32,10 +32,9 @@ ## then @var{x}, @var{y}, and @var{z} can be specified as vectors and ## @code{meshgrid} is used to create the 3-D grid. ## -## If @var{x}, @var{y}, and @var{z} are not given they are assumed to be -## @code{(1:@var{m}, 1:@var{n}, 1:@var{p})} where -## @code{[@var{m}, @var{n}] = size (@var{u})} and -## @code{@var{p} = max (size (@var{w}))}. +## If @var{x} and @var{y} are not given they are assumed to be +## @code{(1:@var{m}, 1:@var{n})} where +## @code{[@var{m}, @var{n}] = size (@var{u})}. ## ## The optional input @var{s} is a scalar defining a scaling factor to use for ## the arrows of the field relative to the mesh spacing. A value of 1.0 will