annotate scripts/plot/draw/quiver3.m @ 32062:ada96a467a28

quiver: Improve plotting with non-float numeric inputs (bug #59695) * scripts/plot/draw/private/__quiver__.m: Change firstnonnumeric check to look for char instead of numeric to allow for logical inputs. Recast all inputs up to firstnonnumeric as doubles. Check if firstnonnumeric element is 'off' and if so set scale factor to 0 and increment firstnonnumeric. * scripts/plot/draw/quiver.m: Update docstring to include scaling factor option 'off'. Add BIST for int and logical input types. * scripts/plot/draw/quiver3.m: Update docstring to include scaling factor option 'off'. Add BISTs for too-few inputs. * etc/NEWS.9.md: Appended details of changes to quiver note under General Improvements and noted it also applies to quiver3.
author Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
date Wed, 26 Apr 2023 17:18:50 -0400
parents 597f3ee61a48
children 03fe0b635d2e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ########################################################################
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 ##
31706
597f3ee61a48 update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 30564
diff changeset
3 ## Copyright (C) 2007-2023 The Octave Project Developers
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26834
diff changeset
4 ##
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 ## See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 ## distribution or <https://octave.org/copyright/>.
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
7 ##
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
8 ## This file is part of Octave.
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
9 ##
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24432
diff changeset
10 ## Octave is free software: you can redistribute it and/or modify it
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
11 ## under the terms of the GNU General Public License as published by
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24432
diff changeset
12 ## the Free Software Foundation, either version 3 of the License, or
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22367
diff changeset
13 ## (at your option) any later version.
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
14 ##
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
15 ## Octave is distributed in the hope that it will be useful, but
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22367
diff changeset
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22367
diff changeset
18 ## GNU General Public License for more details.
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
19 ##
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
20 ## You should have received a copy of the GNU General Public License
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
21 ## along with Octave; see the file COPYING. If not, see
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24432
diff changeset
22 ## <https://www.gnu.org/licenses/>.
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 ##
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ########################################################################
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
25
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
26 ## -*- texinfo -*-
26834
e07ea25d58f5 quiver3.m: Fix texinfo typo in docstring from cset f7b10bd40045.
Rik <rik@octave.org>
parents: 26831
diff changeset
27 ## @deftypefn {} {} quiver3 (@var{x}, @var{y}, @var{z}, @var{u}, @var{v}, @var{w})
e07ea25d58f5 quiver3.m: Fix texinfo typo in docstring from cset f7b10bd40045.
Rik <rik@octave.org>
parents: 26831
diff changeset
28 ## @deftypefnx {} {} quiver3 (@var{z}, @var{u}, @var{v}, @var{w})
20852
516bb87ea72e 2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents: 20181
diff changeset
29 ## @deftypefnx {} {} quiver3 (@dots{}, @var{s})
516bb87ea72e 2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents: 20181
diff changeset
30 ## @deftypefnx {} {} quiver3 (@dots{}, @var{style})
516bb87ea72e 2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents: 20181
diff changeset
31 ## @deftypefnx {} {} quiver3 (@dots{}, "filled")
516bb87ea72e 2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents: 20181
diff changeset
32 ## @deftypefnx {} {} quiver3 (@var{hax}, @dots{})
516bb87ea72e 2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents: 20181
diff changeset
33 ## @deftypefnx {} {@var{h} =} quiver3 (@dots{})
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
34 ##
20173
777f26aa8e3e doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
35 ## Plot a 3-D vector field with arrows.
20181
aa36fb998a4d maint: Remove unnecessary whitespace at end of lines.
Rik <rik@octave.org>
parents: 20173
diff changeset
36 ##
24381
6915cc404dba doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents: 23219
diff changeset
37 ## Plot the (@var{u}, @var{v}, @var{w}) components of a vector field at the
6915cc404dba doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents: 23219
diff changeset
38 ## grid points defined by (@var{x}, @var{y}, @var{z}). If the grid is uniform
6915cc404dba doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents: 23219
diff changeset
39 ## then @var{x}, @var{y}, and @var{z} can be specified as vectors and
6915cc404dba doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents: 23219
diff changeset
40 ## @code{meshgrid} is used to create the 3-D grid.
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
41 ##
26831
677764865056 Accept 4-input form for quiver3 (bug #55570).
Rik <rik@octave.org>
parents: 26376
diff changeset
42 ## If @var{x} and @var{y} are not given they are assumed to be
677764865056 Accept 4-input form for quiver3 (bug #55570).
Rik <rik@octave.org>
parents: 26376
diff changeset
43 ## @code{(1:@var{m}, 1:@var{n})} where
677764865056 Accept 4-input form for quiver3 (bug #55570).
Rik <rik@octave.org>
parents: 26376
diff changeset
44 ## @code{[@var{m}, @var{n}] = size (@var{u})}.
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
45 ##
24381
6915cc404dba doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents: 23219
diff changeset
46 ## The optional input @var{s} is a scalar defining a scaling factor to use for
6915cc404dba doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents: 23219
diff changeset
47 ## the arrows of the field relative to the mesh spacing. A value of 1.0 will
6915cc404dba doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents: 23219
diff changeset
48 ## result in the longest vector exactly filling one grid cube. A value of 0
32062
ada96a467a28 quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents: 31706
diff changeset
49 ## or "off" disables all scaling. The default value is 0.9.
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
50 ##
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
51 ## The style to use for the plot can be defined with a line style @var{style}
24381
6915cc404dba doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents: 23219
diff changeset
52 ## of the same format as the @code{plot} command. If a marker is specified
6915cc404dba doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents: 23219
diff changeset
53 ## then the markers are drawn at the origin of the vectors (which are the grid
6915cc404dba doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents: 23219
diff changeset
54 ## points defined by @var{x}, @var{y}, @var{z}). When a marker is specified,
6915cc404dba doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents: 23219
diff changeset
55 ## the arrowhead is not drawn. If the argument @qcode{"filled"} is given then
21546
f7f97d7e9294 doc: Wrap m-file docstrings to 79 characters + newline (80 total).
Rik <rik@octave.org>
parents: 20852
diff changeset
56 ## the markers are filled.
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
57 ##
24431
0c6cedafc71e doc: Use 'axes' rather than 'axis' appropriately in docstrings.
Rik <rik@octave.org>
parents: 24381
diff changeset
58 ## If the first argument @var{hax} is an axes handle, then plot into this axes,
17161
52931d71400f doc: Document that first argument can be an axes handle for several plot functions.
Rik <rik@octave.org>
parents: 17122
diff changeset
59 ## rather than the current axes returned by @code{gca}.
52931d71400f doc: Document that first argument can be an axes handle for several plot functions.
Rik <rik@octave.org>
parents: 17122
diff changeset
60 ##
14001
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 11587
diff changeset
61 ## The optional return value @var{h} is a graphics handle to a quiver object.
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 11587
diff changeset
62 ## A quiver object regroups the components of the quiver plot (body, arrow,
5f0bb45e615c doc: Update documentation for functions returning a graphics handle h (Bug #34761)
Rik <octave@nomad.inbox5.com>
parents: 11587
diff changeset
63 ## and marker), and allows them to be changed together.
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
64 ##
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
65 ## @example
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
66 ## @group
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
67 ## [x, y, z] = peaks (25);
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
68 ## surf (x, y, z);
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
69 ## hold on;
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
70 ## [u, v, w] = surfnorm (x, y, z / 10);
8056
9a6f4713f765 Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents: 7245
diff changeset
71 ## h = quiver3 (x, y, z, u, v, w);
9a6f4713f765 Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents: 7245
diff changeset
72 ## set (h, "maxheadsize", 0.33);
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
73 ## @end group
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
74 ## @end example
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
75 ##
17122
eaab03308c0b doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents: 17070
diff changeset
76 ## @seealso{quiver, compass, feather, plot}
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
77 ## @end deftypefn
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
78
17671
ddfc1600a311 Overhaul quiver/quiver3 functions.
Rik <rik@octave.org>
parents: 17670
diff changeset
79 function h = quiver3 (varargin)
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
80
17070
d465f9970c02 quiver.m, quiver3.m: Upgrade to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 16814
diff changeset
81 [hax, varargin, nargin] = __plt_get_axis_arg__ ("quiver3", varargin{:});
7215
dd88d61d443f [project @ 2007-11-29 16:44:45 by jwe]
jwe
parents: 7208
diff changeset
82
32062
ada96a467a28 quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents: 31706
diff changeset
83 if (nargin < 4)
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
84 print_usage ();
17671
ddfc1600a311 Overhaul quiver/quiver3 functions.
Rik <rik@octave.org>
parents: 17670
diff changeset
85 endif
ddfc1600a311 Overhaul quiver/quiver3 functions.
Rik <rik@octave.org>
parents: 17670
diff changeset
86
17211
87ba70043bfc Don't use ifelse in plot fcns to avoid unnecessary fcn evaluations.
Rik <rik@octave.org>
parents: 17161
diff changeset
87 oldfig = [];
17301
68bcac3c043a Correct inversion accidentally introduced in cset 87ba70043bfc.
Rik <rik@octave.org>
parents: 17281
diff changeset
88 if (! isempty (hax))
17211
87ba70043bfc Don't use ifelse in plot fcns to avoid unnecessary fcn evaluations.
Rik <rik@octave.org>
parents: 17161
diff changeset
89 oldfig = get (0, "currentfigure");
87ba70043bfc Don't use ifelse in plot fcns to avoid unnecessary fcn evaluations.
Rik <rik@octave.org>
parents: 17161
diff changeset
90 endif
17671
ddfc1600a311 Overhaul quiver/quiver3 functions.
Rik <rik@octave.org>
parents: 17670
diff changeset
91 unwind_protect
ddfc1600a311 Overhaul quiver/quiver3 functions.
Rik <rik@octave.org>
parents: 17670
diff changeset
92 hax = newplot (hax);
ddfc1600a311 Overhaul quiver/quiver3 functions.
Rik <rik@octave.org>
parents: 17670
diff changeset
93 htmp = __quiver__ (hax, true, varargin{:});
17070
d465f9970c02 quiver.m, quiver3.m: Upgrade to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 16814
diff changeset
94
22367
459545bc9019 Use ishold () rather than ishold (hax) for performance.
Rik <rik@octave.org>
parents: 22351
diff changeset
95 if (! ishold ())
22351
e6df1ddfc3cf Change DefaultAxesBox property to "off".
Rik <rik@octave.org>
parents: 22323
diff changeset
96 set (hax, "view", [-37.5, 30],
17671
ddfc1600a311 Overhaul quiver/quiver3 functions.
Rik <rik@octave.org>
parents: 17670
diff changeset
97 "xgrid", "on", "ygrid", "on", "zgrid", "on");
ddfc1600a311 Overhaul quiver/quiver3 functions.
Rik <rik@octave.org>
parents: 17670
diff changeset
98 endif
ddfc1600a311 Overhaul quiver/quiver3 functions.
Rik <rik@octave.org>
parents: 17670
diff changeset
99 unwind_protect_cleanup
ddfc1600a311 Overhaul quiver/quiver3 functions.
Rik <rik@octave.org>
parents: 17670
diff changeset
100 if (! isempty (oldfig))
ddfc1600a311 Overhaul quiver/quiver3 functions.
Rik <rik@octave.org>
parents: 17670
diff changeset
101 set (0, "currentfigure", oldfig);
ddfc1600a311 Overhaul quiver/quiver3 functions.
Rik <rik@octave.org>
parents: 17670
diff changeset
102 endif
ddfc1600a311 Overhaul quiver/quiver3 functions.
Rik <rik@octave.org>
parents: 17670
diff changeset
103 end_unwind_protect
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
104
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
105 if (nargout > 0)
17671
ddfc1600a311 Overhaul quiver/quiver3 functions.
Rik <rik@octave.org>
parents: 17670
diff changeset
106 h = htmp;
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
107 endif
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
108
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
109 endfunction
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
110
14237
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
111
7189
e8d953d03f6a [project @ 2007-11-26 20:42:09 by dbateman]
dbateman
parents:
diff changeset
112 %!demo
14237
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
113 %! clf;
22302
1c4cd12987f5 Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents: 21546
diff changeset
114 %! colormap ("default");
7245
d65670971cbc [project @ 2007-12-04 03:03:54 by jwe]
jwe
parents: 7215
diff changeset
115 %! [x, y, z] = peaks (25);
d65670971cbc [project @ 2007-12-04 03:03:54 by jwe]
jwe
parents: 7215
diff changeset
116 %! surf (x, y, z);
d65670971cbc [project @ 2007-12-04 03:03:54 by jwe]
jwe
parents: 7215
diff changeset
117 %! hold on;
d65670971cbc [project @ 2007-12-04 03:03:54 by jwe]
jwe
parents: 7215
diff changeset
118 %! [u, v, w] = surfnorm (x, y, z / 10);
8056
9a6f4713f765 Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents: 7245
diff changeset
119 %! h = quiver3 (x, y, z, u, v, w);
22302
1c4cd12987f5 Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents: 21546
diff changeset
120 %! set (h, "maxheadsize", 0.25);
8253
873ea2c72f16 quiver3.m: turn hold off after demo
John W. Eaton <jwe@octave.org>
parents: 8056
diff changeset
121 %! hold off;
24381
6915cc404dba doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents: 23219
diff changeset
122 %! title ("quiver3() of surface normals to peaks() function");
8889
665b264b6a50 Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents: 8253
diff changeset
123
665b264b6a50 Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents: 8253
diff changeset
124 %!demo
14237
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
125 %! clf;
22302
1c4cd12987f5 Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents: 21546
diff changeset
126 %! colormap ("default");
14092
22c50cbad2ce Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents: 14001
diff changeset
127 %! [x, y, z] = peaks (25);
22c50cbad2ce Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents: 14001
diff changeset
128 %! surf (x, y, z);
22c50cbad2ce Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents: 14001
diff changeset
129 %! hold on;
22c50cbad2ce Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents: 14001
diff changeset
130 %! [u, v, w] = surfnorm (x, y, z / 10);
22c50cbad2ce Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents: 14001
diff changeset
131 %! h = quiver3 (x, y, z, u, v, w);
22302
1c4cd12987f5 Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents: 21546
diff changeset
132 %! set (h, "maxheadsize", 0.25);
14092
22c50cbad2ce Add clf() to all plot demos.
Ben Abbott <bpabbott@mac.com>
parents: 14001
diff changeset
133 %! hold off;
14237
11949c9795a0 Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
134 %! shading interp;
24381
6915cc404dba doc: Clarify quiver/quiver3 documentation when a linestyle is given (bug #52608).
Rik <rik@octave.org>
parents: 23219
diff changeset
135 %! title ({"quiver3() of surface normals to peaks() function"; ...
17671
ddfc1600a311 Overhaul quiver/quiver3 functions.
Rik <rik@octave.org>
parents: 17670
diff changeset
136 %! 'shading "interp"'});
32062
ada96a467a28 quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents: 31706
diff changeset
137
ada96a467a28 quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents: 31706
diff changeset
138 ##Test input validation
ada96a467a28 quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents: 31706
diff changeset
139 %!error <Invalid call> quiver3 ()
ada96a467a28 quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents: 31706
diff changeset
140 %!error <Invalid call> quiver3 (1.1)
ada96a467a28 quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents: 31706
diff changeset
141 %!error <Invalid call> quiver3 (1.1, 2)
ada96a467a28 quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents: 31706
diff changeset
142 %!error <Invalid call> quiver3 (1.1, 2, 3)
ada96a467a28 quiver: Improve plotting with non-float numeric inputs (bug #59695)
Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
parents: 31706
diff changeset
143