Mercurial > octave-nkf
annotate scripts/plot/draw/private/__quiver__.m @ 19405:009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
* __quiver__.m: initialize uu, vv and ww, and compute arrows length first.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Thu, 27 Nov 2014 21:49:55 +0100 |
parents | d63878346099 |
children | db92e7e28e1f |
rev | line source |
---|---|
17744
d63878346099
maint: Update copyright notices for release.
John W. Eaton <jwe@octave.org>
parents:
17671
diff
changeset
|
1 ## Copyright (C) 2007-2013 David Bateman |
7189 | 2 ## |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
8 ## your option) any later version. | |
9 ## | |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
16 ## along with Octave; see the file COPYING. If not, see | |
17 ## <http://www.gnu.org/licenses/>. | |
18 | |
8812
7d48766c21a5
use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents:
8532
diff
changeset
|
19 ## -*- texinfo -*- |
7d48766c21a5
use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents:
8532
diff
changeset
|
20 ## @deftypefn {Function File} {@var{hg} =} __quiver__ (@dots{}) |
7d48766c21a5
use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents:
8532
diff
changeset
|
21 ## Undocumented internal function. |
7d48766c21a5
use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents:
8532
diff
changeset
|
22 ## @end deftypefn |
7189 | 23 |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
24 function hg = __quiver__ (varargin) |
7191 | 25 |
26 h = varargin{1}; | |
27 is3d = varargin{2}; | |
7189 | 28 |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
29 autoscale = 0.9; |
17671 | 30 ## Matlab uses 0.2, but Octave's algorithm produces equivalent visual |
31 ## results if arrowsize=0.33. Since this is just a non-dimensional | |
32 ## scaling factor we scale the arrowsize property value by 0.33/0.20 | |
33 ## in order to get equivalent visual results while keeping equivalent | |
34 ## property values. | |
35 arrowsize = 0.20; | |
7189 | 36 |
17671 | 37 firstnonnumeric = find (! cellfun ("isnumeric", varargin(3:nargin)), 1); |
38 if (isempty (firstnonnumeric)) | |
39 firstnonnumeric = Inf; | |
40 else | |
41 firstnonnumeric += 2; | |
42 endif | |
7189 | 43 |
44 ioff = 3; | |
45 if (nargin < (6 + is3d) || firstnonnumeric < (6 + is3d)) | |
46 u = varargin{ioff++}; | |
47 v = varargin{ioff++}; | |
48 if (is3d) | |
11589
b0084095098e
missing semicolons in script files
John W. Eaton <jwe@octave.org>
parents:
11587
diff
changeset
|
49 w = varargin{ioff++}; |
14872
c2dbdeaa25df
maint: use rows() and columns() to clarify m-files.
Rik <octave@nomad.inbox5.com>
parents:
14868
diff
changeset
|
50 [x, y, z] = meshgrid (1:columns (u), 1:rows (u), 1:max (size (w))); |
7189 | 51 else |
14872
c2dbdeaa25df
maint: use rows() and columns() to clarify m-files.
Rik <octave@nomad.inbox5.com>
parents:
14868
diff
changeset
|
52 [x, y] = meshgrid (1:columns (u), 1:rows (u)); |
7189 | 53 endif |
7191 | 54 if (nargin >= ioff && isnumeric (varargin{ioff}) |
10549 | 55 && isscalar (varargin{ioff})) |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
56 autoscale = varargin{ioff++}; |
7189 | 57 endif |
58 else | |
59 x = varargin{ioff++}; | |
60 y = varargin{ioff++}; | |
61 if (is3d) | |
62 z = varargin{ioff++}; | |
63 endif | |
64 u = varargin{ioff++}; | |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
65 v = varargin{ioff++}; |
7189 | 66 if (is3d) |
67 w = varargin{ioff++}; | |
7191 | 68 if (isvector (x) && isvector (y) && isvector (z) |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
69 && (! isvector (u) || ! isvector (v) || ! isvector (w))) |
10549 | 70 [x, y, z] = meshgrid (x, y, z); |
7189 | 71 endif |
72 else | |
7191 | 73 if (isvector (x) && isvector (y) && (! isvector (u) || ! isvector (v))) |
10549 | 74 [x, y] = meshgrid (x, y); |
7189 | 75 endif |
76 endif | |
7191 | 77 if (nargin >= ioff && isnumeric (varargin{ioff}) |
10549 | 78 && isscalar (varargin{ioff})) |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
79 autoscale = varargin{ioff++}; |
7189 | 80 endif |
81 endif | |
82 | |
83 have_filled = false; | |
84 have_line_spec = false; | |
8070
3b53b25e2550
Add data sources and line series
David Bateman <dbateman@free.fr>
parents:
8056
diff
changeset
|
85 args = {}; |
7189 | 86 while (ioff <= nargin) |
7191 | 87 arg = varargin{ioff++}; |
17405
3f0ed69d21c6
Replace unnecessary instances of strncmp with strcmp.
Rik <rik@octave.org>
parents:
17338
diff
changeset
|
88 if (ischar (arg) && strcmpi (arg, "filled")) |
7189 | 89 have_filled = true; |
17462
177147bf7b55
Overhaul use of __pltopt__.m to correctly check for cellstr, not just cell.
Rik <rik@octave.org>
parents:
17405
diff
changeset
|
90 elseif ((ischar (arg) || iscellstr (arg)) |
10549 | 91 && ! have_line_spec) |
7189 | 92 [linespec, valid] = __pltopt__ ("quiver", arg, false); |
93 if (valid) | |
10549 | 94 have_line_spec = true; |
17671 | 95 if (isempty (linespec.linestyle) || strcmp (linespec.linestyle, "none")) |
10549 | 96 linespec.linestyle = "-"; |
97 endif | |
7189 | 98 else |
17671 | 99 args{end+1} = arg; |
8070
3b53b25e2550
Add data sources and line series
David Bateman <dbateman@free.fr>
parents:
8056
diff
changeset
|
100 if (ioff <= nargin) |
17671 | 101 args{end+1} = varargin{ioff++}; |
8070
3b53b25e2550
Add data sources and line series
David Bateman <dbateman@free.fr>
parents:
8056
diff
changeset
|
102 endif |
7189 | 103 endif |
104 else | |
17671 | 105 args{end+1} = arg; |
8070
3b53b25e2550
Add data sources and line series
David Bateman <dbateman@free.fr>
parents:
8056
diff
changeset
|
106 if (ioff <= nargin) |
17671 | 107 args{end+1} = varargin{ioff++}; |
8070
3b53b25e2550
Add data sources and line series
David Bateman <dbateman@free.fr>
parents:
8056
diff
changeset
|
108 endif |
7189 | 109 endif |
110 endwhile | |
111 | |
17671 | 112 ## Normalize 0.20 to 1/3 for plotting |
113 arrowsize /= 0.20 * 3; | |
114 | |
19405
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
115 ## Scale the arrows to fit in the grid |
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
116 uu = u; |
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
117 vv = v; |
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
118 if (is3d) |
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
119 ww = w; |
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
120 len = max (sqrt (u(:).^2 + v(:).^2 + w(:).^2)); |
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
121 else |
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
122 len = max (sqrt (u(:).^2 + v(:).^2)); |
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
123 endif |
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
124 if (len > 0 && autoscale && numel (u) > 1) |
12554
4040a95a586d
Revamp quiver autoscaling algorithm (bug #32836).
Rik <octave@nomad.inbox5.com>
parents:
11589
diff
changeset
|
125 if (isvector (x)) |
17671 | 126 nx = ny = sqrt (length (x)); |
12554
4040a95a586d
Revamp quiver autoscaling algorithm (bug #32836).
Rik <octave@nomad.inbox5.com>
parents:
11589
diff
changeset
|
127 else |
17671 | 128 [ny, nx] = size (x); # assume meshgrid fmt, x in columns, y in rows |
12554
4040a95a586d
Revamp quiver autoscaling algorithm (bug #32836).
Rik <octave@nomad.inbox5.com>
parents:
11589
diff
changeset
|
129 endif |
17671 | 130 dx = (max (x(:)) - min (x(:))) / nx; |
131 dy = (max (y(:)) - min (y(:))) / ny; | |
7189 | 132 if (is3d) |
17671 | 133 dz = (max (z(:)) - min (z(:))) / max (nx, ny); |
7189 | 134 else |
135 dz = 0; | |
136 endif | |
19405
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
137 sd = sqrt (dx.^2 + dy.^2 + dz.^2) / len; |
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
138 if (sd != 0) |
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
139 s = autoscale * sd; |
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
140 else # special case of identical points with multiple vectors |
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
141 s = autoscale; |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
142 endif |
19405
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
143 uu = s * u; |
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
144 vv = s * v; |
8315
e9687c313d5f
Fix callbacks in stem and quiver for change in order of children. Fix for scaling in quiver for single arrow
David Bateman <dbateman@free.fr>
parents:
8190
diff
changeset
|
145 if (is3d) |
19405
009191dbc76d
quiver: fix initialization error when called with zeros (bug #43686)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
17744
diff
changeset
|
146 ww = s * w; |
8315
e9687c313d5f
Fix callbacks in stem and quiver for change in order of children. Fix for scaling in quiver for single arrow
David Bateman <dbateman@free.fr>
parents:
8190
diff
changeset
|
147 endif |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
148 endif |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
149 |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
150 hstate = get (h, "nextplot"); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
151 unwind_protect |
17671 | 152 |
153 if (have_line_spec) | |
154 ls = linespec.linestyle; | |
155 lc = linespec.color; | |
156 else | |
157 ls = "-"; | |
158 lc = __next_line_color__ (); | |
159 endif | |
160 | |
161 ## Must occur after __next_line_color__ in order to work correctly. | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
162 hg = hggroup (); |
8070
3b53b25e2550
Add data sources and line series
David Bateman <dbateman@free.fr>
parents:
8056
diff
changeset
|
163 if (is3d) |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
164 args = __add_datasource__ ("quiver3", hg, |
10549 | 165 {"x", "y", "z", "u", "v", "w"}, args{:}); |
8070
3b53b25e2550
Add data sources and line series
David Bateman <dbateman@free.fr>
parents:
8056
diff
changeset
|
166 else |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
167 args = __add_datasource__ ("quiver", hg, |
10549 | 168 {"x", "y", "z", "u", "v", "w"}, args{:}); |
8070
3b53b25e2550
Add data sources and line series
David Bateman <dbateman@free.fr>
parents:
8056
diff
changeset
|
169 endif |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
170 hold on; |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
171 |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
172 addproperty ("xdata", hg, "data", x); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
173 addproperty ("ydata", hg, "data", y); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
174 |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
175 addproperty ("udata", hg, "data", u); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
176 addproperty ("vdata", hg, "data", v); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
177 if (is3d) |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
178 addproperty ("zdata", hg, "data", z); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
179 addproperty ("wdata", hg, "data", w); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
180 else |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
181 addproperty ("zdata", hg, "data", []); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
182 addproperty ("wdata", hg, "data", []); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
183 endif |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
184 |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
185 addlistener (hg, "xdata", @update_data); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
186 addlistener (hg, "ydata", @update_data); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
187 addlistener (hg, "zdata", @update_data); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
188 addlistener (hg, "udata", @update_data); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
189 addlistener (hg, "vdata", @update_data); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
190 addlistener (hg, "wdata", @update_data); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
191 |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
192 x = x(:); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
193 y = y(:); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
194 xend = x + uu(:); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
195 yend = y + vv(:); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
196 if (is3d) |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
197 z = z(:); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
198 zend = z + ww(:); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
199 endif |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
200 |
17671 | 201 ## Draw arrow shaft as one line object |
202 if (is3d) | |
203 h1 = plot3 ([x.'; xend.'; NaN(1, length (x))](:), | |
204 [y.'; yend.'; NaN(1, length (y))](:), | |
205 [z.'; zend.'; NaN(1, length (z))](:), | |
206 "linestyle", ls, "color", lc, "parent", hg); | |
207 else | |
208 h1 = plot ([x.'; xend.'; NaN(1, length (x))](:), | |
209 [y.'; yend.'; NaN(1, length (y))](:), | |
210 "linestyle", ls, "color", lc, "parent", hg); | |
211 endif | |
212 | |
213 xtmp = x + uu(:) * (1 - arrowsize); | |
214 ytmp = y + vv(:) * (1 - arrowsize); | |
215 | |
216 if (is3d) | |
217 xydist = sqrt (uu(:).^2 + vv(:).^2 + ww(:).^2) ./ ... | |
218 (sqrt (uu(:).^2 + vv(:).^2) + eps); | |
219 xarrw1 = xtmp + vv(:) .* xydist * arrowsize / 4; | |
220 xarrw2 = xtmp - vv(:) .* xydist * arrowsize / 4; | |
221 yarrw1 = ytmp - uu(:) .* xydist * arrowsize / 4; | |
222 yarrw2 = ytmp + uu(:) .* xydist * arrowsize / 4; | |
223 zarrw1 = zarrw2 = zend - ww(:) * arrowsize; | |
224 else | |
225 xarrw1 = xtmp + vv(:) * arrowsize / 3; | |
226 xarrw2 = xtmp - vv(:) * arrowsize / 3; | |
227 yarrw1 = ytmp - uu(:) * arrowsize / 3; | |
228 yarrw2 = ytmp + uu(:) * arrowsize / 3; | |
229 endif | |
230 | |
231 ## Draw arrowhead as one line object | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
232 if (have_line_spec) |
17671 | 233 if (! isempty (linespec.marker) && ! strcmp (linespec.marker, "none")) |
234 ls = "none"; # No arrowhead drawn when marker present | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
235 endif |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
236 endif |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
237 |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
238 if (is3d) |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
239 h2 = plot3 ([xarrw1.'; xend.'; xarrw2.'; NaN(1, length (x))](:), |
10549 | 240 [yarrw1.'; yend.'; yarrw2.'; NaN(1, length (y))](:), |
241 [zarrw1.'; zend.'; zarrw2.'; NaN(1, length (z))](:), | |
17671 | 242 "linestyle", ls, "color", lc, "parent", hg); |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
243 else |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
244 h2 = plot ([xarrw1.'; xend.'; xarrw2.'; NaN(1, length (x))](:), |
10549 | 245 [yarrw1.'; yend.'; yarrw2.'; NaN(1, length (y))](:), |
17671 | 246 "linestyle", ls, "color", lc, "parent", hg); |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
247 endif |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
248 |
17671 | 249 ## Draw arrow base marker as a third line object |
250 if (! have_line_spec || isempty (linespec.marker)) | |
251 mk = "none"; | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
252 else |
17671 | 253 mk = linespec.marker; |
254 endif | |
255 if (is3d) | |
256 h3 = plot3 (x, y, z, "linestyle", "none", "marker", mk, "parent", hg); | |
257 else | |
258 h3 = plot (x, y, "linestyle", "none", "marker", mk, "parent", hg); | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
259 endif |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
260 if (have_filled) |
17070
d465f9970c02
quiver.m, quiver3.m: Upgrade to use new __plt_get_axis_arg__.
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
15803
diff
changeset
|
261 ## FIXME: gnuplot doesn't respect the markerfacecolor field |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
262 set (h3, "markerfacecolor", get (h1, "color")); |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
263 endif |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
264 |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
265 ## Set up the hggroup properties and listeners |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
266 if (autoscale) |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
267 addproperty ("autoscale", hg, "radio", "{on}|off", "on"); |
11589
b0084095098e
missing semicolons in script files
John W. Eaton <jwe@octave.org>
parents:
11587
diff
changeset
|
268 addproperty ("autoscalefactor", hg, "data", autoscale); |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
269 else |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
270 addproperty ("autoscale", hg, "radio", "{on}|off", "off"); |
11589
b0084095098e
missing semicolons in script files
John W. Eaton <jwe@octave.org>
parents:
11587
diff
changeset
|
271 addproperty ("autoscalefactor", hg, "data", 1.0); |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
272 endif |
11589
b0084095098e
missing semicolons in script files
John W. Eaton <jwe@octave.org>
parents:
11587
diff
changeset
|
273 addlistener (hg, "autoscale", @update_data); |
b0084095098e
missing semicolons in script files
John W. Eaton <jwe@octave.org>
parents:
11587
diff
changeset
|
274 addlistener (hg, "autoscalefactor", @update_data); |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
275 |
17671 | 276 addproperty ("maxheadsize", hg, "data", arrowsize * .20*3); |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
277 addlistener (hg, "maxheadsize", @update_data); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
278 |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
279 addproperty ("showarrowhead", hg, "radio", "{on}|off", "on"); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
280 addlistener (hg, "showarrowhead", @update_props); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
281 |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
282 addproperty ("color", hg, "linecolor", get (h1, "color")); |
17671 | 283 addproperty ("linestyle", hg, "linelinestyle", get (h1, "linestyle")); |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
284 addproperty ("linewidth", hg, "linelinewidth", get (h1, "linewidth")); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
285 addproperty ("marker", hg, "linemarker", get (h3, "marker")); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
286 addproperty ("markerfacecolor", hg, "linemarkerfacecolor", |
10549 | 287 get (h3, "markerfacecolor")); |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
288 addproperty ("markersize", hg, "linemarkersize", get (h3, "markersize")); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
289 |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
290 addlistener (hg, "color", @update_props); |
17671 | 291 addlistener (hg, "linestyle", @update_props); |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
292 addlistener (hg, "linewidth", @update_props); |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
293 addlistener (hg, "marker", @update_props); |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
294 addlistener (hg, "markerfacecolor", @update_props); |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
295 addlistener (hg, "markersize", @update_props); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
296 |
17527
76614e624818
Add "HitTestArea" property to certain hggroups for Matlab compatibility
Rik <rik@octave.org>
parents:
17462
diff
changeset
|
297 ## Matlab property, although Octave does not implement it. |
76614e624818
Add "HitTestArea" property to certain hggroups for Matlab compatibility
Rik <rik@octave.org>
parents:
17462
diff
changeset
|
298 addproperty ("hittestarea", hg, "radio", "on|{off}", "off"); |
76614e624818
Add "HitTestArea" property to certain hggroups for Matlab compatibility
Rik <rik@octave.org>
parents:
17462
diff
changeset
|
299 |
8079
082fa7859574
Additional do not call set with empty arguments fixes
David Bateman <dbateman@free.fr>
parents:
8075
diff
changeset
|
300 if (! isempty (args)) |
082fa7859574
Additional do not call set with empty arguments fixes
David Bateman <dbateman@free.fr>
parents:
8075
diff
changeset
|
301 set (hg, args{:}); |
082fa7859574
Additional do not call set with empty arguments fixes
David Bateman <dbateman@free.fr>
parents:
8075
diff
changeset
|
302 endif |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
303 unwind_protect_cleanup |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
304 set (h, "nextplot", hstate); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
305 end_unwind_protect |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
306 |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
307 endfunction |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
308 |
17671 | 309 function update_data (h, ~) |
310 | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
311 x = get (h, "xdata"); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
312 y = get (h, "ydata"); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
313 z = get (h, "zdata"); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
314 |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
315 u = get (h, "udata"); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
316 v = get (h, "vdata"); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
317 w = get (h, "wdata"); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
318 |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
319 s = get (h, "autoscalefactor"); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
320 arrowsize = get (h, "maxheadsize"); |
17671 | 321 arrowsize /= 0.20 * 3; |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
322 |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
323 kids = get (h, "children"); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
324 |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
325 if (isempty (z) || isempty (w)) |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
326 is3d = false; |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
327 else |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
328 is3d = true; |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
329 endif |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
330 |
17671 | 331 if (strcmp (get (h, "autoscale"), "on") && s != 0) |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
332 ## Scale the arrows to fit in the grid |
12554
4040a95a586d
Revamp quiver autoscaling algorithm (bug #32836).
Rik <octave@nomad.inbox5.com>
parents:
11589
diff
changeset
|
333 if (isvector (x)) |
17671 | 334 nx = ny = sqrt (length (x)); |
12554
4040a95a586d
Revamp quiver autoscaling algorithm (bug #32836).
Rik <octave@nomad.inbox5.com>
parents:
11589
diff
changeset
|
335 else |
17671 | 336 [ny, nx] = size (x); |
12554
4040a95a586d
Revamp quiver autoscaling algorithm (bug #32836).
Rik <octave@nomad.inbox5.com>
parents:
11589
diff
changeset
|
337 endif |
17671 | 338 dx = (max (x(:)) - min (x(:))) / nx; |
339 dy = (max (y(:)) - min (y(:))) / ny; | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
340 if (is3d) |
17671 | 341 dz = (max (z(:)) - min (z(:))) / max (nx, ny); |
12554
4040a95a586d
Revamp quiver autoscaling algorithm (bug #32836).
Rik <octave@nomad.inbox5.com>
parents:
11589
diff
changeset
|
342 len = max (sqrt (u(:).^2 + v(:).^2 + w(:).^2)); |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
343 else |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
344 dz = 0; |
12554
4040a95a586d
Revamp quiver autoscaling algorithm (bug #32836).
Rik <octave@nomad.inbox5.com>
parents:
11589
diff
changeset
|
345 len = max (sqrt (u(:).^2 + v(:).^2)); |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
346 endif |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
347 if (len > 0) |
12554
4040a95a586d
Revamp quiver autoscaling algorithm (bug #32836).
Rik <octave@nomad.inbox5.com>
parents:
11589
diff
changeset
|
348 sd = sqrt (dx.^2 + dy.^2 + dz.^2) / len; |
4040a95a586d
Revamp quiver autoscaling algorithm (bug #32836).
Rik <octave@nomad.inbox5.com>
parents:
11589
diff
changeset
|
349 if (sd != 0) |
17671 | 350 s *= sd; |
12554
4040a95a586d
Revamp quiver autoscaling algorithm (bug #32836).
Rik <octave@nomad.inbox5.com>
parents:
11589
diff
changeset
|
351 endif |
7189 | 352 u = s * u; |
353 v = s * v; | |
354 if (is3d) | |
17671 | 355 w = s * w; |
7189 | 356 endif |
357 endif | |
358 endif | |
359 | |
360 x = x(:); | |
361 y = y(:); | |
362 xend = x + u(:); | |
363 yend = y + v(:); | |
364 if (is3d) | |
365 z = z(:); | |
366 zend = z + w(:); | |
367 endif | |
368 | |
17671 | 369 set (kids(3), "xdata", [x.'; xend.'; NaN(1, length (x))](:)); |
370 set (kids(3), "ydata", [y.'; yend.'; NaN(1, length (y))](:)); | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
371 if (is3d) |
17671 | 372 set (kids(3), "zdata", [z.'; zend.'; NaN(1, length (z))](:)); |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
373 endif |
7189 | 374 |
17671 | 375 xtmp = x + u(:) * (1 - arrowsize); |
376 ytmp = y + v(:) * (1 - arrowsize); | |
377 | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
378 if (is3d) |
17671 | 379 xydist = sqrt (u(:).^2 + v(:).^2 + w(:).^2) ./ ... |
380 (sqrt (u(:).^2 + v(:).^2) + eps); | |
381 xarrw1 = xtmp + v(:) .* xydist * arrowsize / 4; | |
382 xarrw2 = xtmp - v(:) .* xydist * arrowsize / 4; | |
383 yarrw1 = ytmp - u(:) .* xydist * arrowsize / 4; | |
384 yarrw2 = ytmp + u(:) .* xydist * arrowsize / 4; | |
385 zarrw1 = zarrw2 = zend - w(:) * arrowsize; | |
386 else | |
387 xarrw1 = xtmp + v(:) * arrowsize / 3; | |
388 xarrw2 = xtmp - v(:) * arrowsize / 3; | |
389 yarrw1 = ytmp - u(:) * arrowsize / 3; | |
390 yarrw2 = ytmp + u(:) * arrowsize / 3; | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
391 endif |
7189 | 392 |
17671 | 393 set (kids(2), "xdata", [x.'; xend.'; NaN(1, length (x))](:)); |
394 set (kids(2), "ydata", [y.'; yend.'; NaN(1, length (y))](:)); | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
395 if (is3d) |
17671 | 396 set (kids(2), "zdata", [z.'; zend.'; NaN(1, length (z))](:)); |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
397 endif |
7189 | 398 |
17671 | 399 set (kids(2), "xdata", [xarrw1.'; xend.'; xarrw2.'; NaN(1, length (x))](:)); |
400 set (kids(2), "ydata", [yarrw1.'; yend.'; yarrw2.'; NaN(1, length (y))](:)); | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
401 if (is3d) |
17671 | 402 set (kids(2), "zdata", [zarrw1.'; zend.'; zarrw2.'; NaN(1, length (z))](:)); |
403 endif | |
404 | |
405 set (kids(1), "xdata", x); | |
406 set (kids(1), "ydata", y); | |
407 if (is3d) | |
408 set (kids(1), "zdata", z); | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
409 endif |
7189 | 410 |
411 endfunction | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
412 |
17671 | 413 function update_props (h, ~) |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
414 kids = get (h, "children"); |
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
415 |
17671 | 416 set (kids([3 2]), {"color", "linestyle", "linewidth"}, |
417 get (h, {"color", "linestyle", "linewidth"})); | |
418 set (kids(2), "visible", get (h, "showarrowhead")); | |
419 set (kids(1), {"color", "marker", "markerfacecolor", "markersize"}, | |
420 get (h, {"color", "marker", "markerfacecolor", "markersize"})); | |
8056
9a6f4713f765
Add area, bar, quiver and stair series graphics objects. Document them
David Bateman <dbateman@free.fr>
parents:
7768
diff
changeset
|
421 endfunction |
17338
1c89599167a6
maint: End m-files with 1 blank line.
Rik <rik@octave.org>
parents:
17070
diff
changeset
|
422 |