Mercurial > hg > octave-nkf
annotate scripts/plot/private/__scatter__.m @ 16491:b10a23fe80bb
doc: Tweak docstrings of functions changed for Texinfo 5.0 compatibility.
* scripts/audio/wavread.m, scripts/miscellaneous/getappdata.m,
scripts/miscellaneous/license.m, scripts/miscellaneous/ver.m,
scripts/plot/daspect.m, scripts/plot/graphics_toolkit.m,
scripts/plot/pbaspect.m, scripts/polynomial/splinefit.m, scripts/set/union.m,
scripts/signal/freqz.m: Improve docstring wording.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 10 Apr 2013 22:43:30 -0700 |
parents | a0b313c17a6b |
children | 1c89599167a6 |
rev | line source |
---|---|
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
14011
diff
changeset
|
1 ## Copyright (C) 2007-2012 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:
8257
diff
changeset
|
19 ## -*- texinfo -*- |
7d48766c21a5
use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents:
8257
diff
changeset
|
20 ## @deftypefn {Function File} {@var{hg} =} __scatter__ (@dots{}) |
7189 | 21 ## Undocumented internal function. |
8812
7d48766c21a5
use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents:
8257
diff
changeset
|
22 ## @end deftypefn |
7189 | 23 |
8257 | 24 function hg = __scatter__ (varargin) |
7191 | 25 |
26 h = varargin{1}; | |
27 nd = varargin{2}; | |
28 fcn = varargin{3}; | |
29 x = varargin{4}(:); | |
30 y = varargin{5}(:); | |
7189 | 31 istart = 6; |
7191 | 32 |
7189 | 33 if (nd == 3) |
7191 | 34 z = varargin{6}(:); |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14848
diff
changeset
|
35 idx = isnan (x) | isnan (y) | isnan (z); |
7421 | 36 x (idx) = []; |
37 y (idx) = []; | |
38 z (idx) = []; | |
7189 | 39 istart = 7; |
40 else | |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14848
diff
changeset
|
41 idx = isnan (x) | isnan (y); |
7421 | 42 x (idx) = []; |
43 y (idx) = []; | |
7191 | 44 z = zeros (length (x), 0); |
7189 | 45 endif |
46 | |
47 firstnonnumeric = Inf; | |
48 for i = istart:nargin | |
7191 | 49 if (! isnumeric (varargin{i})) |
7189 | 50 firstnonnumeric = i; |
51 break; | |
52 endif | |
53 endfor | |
54 | |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
55 if (istart <= nargin) |
7191 | 56 s = varargin{istart}; |
10697
1215ab6f3491
Honor Matlab color settings for scatter().
Ben Abbott <bpabbott@mac.com>
parents:
10549
diff
changeset
|
57 if (isempty (s) || ischar (s)) |
7603
689652eb95d1
fix for scatter markersize
David Bateman <dbateman@free.fr>
parents:
7421
diff
changeset
|
58 s = 6; |
10701
657e63dcfd88
scatter.m: Properly set default value markersize and marker type.
Ben Abbott <bpabbott@mac.com>
parents:
10697
diff
changeset
|
59 endif |
657e63dcfd88
scatter.m: Properly set default value markersize and marker type.
Ben Abbott <bpabbott@mac.com>
parents:
10697
diff
changeset
|
60 if (! ischar (varargin{istart})) |
10697
1215ab6f3491
Honor Matlab color settings for scatter().
Ben Abbott <bpabbott@mac.com>
parents:
10549
diff
changeset
|
61 istart++; |
7189 | 62 endif |
63 else | |
7603
689652eb95d1
fix for scatter markersize
David Bateman <dbateman@free.fr>
parents:
7421
diff
changeset
|
64 s = 6; |
7189 | 65 endif |
66 | |
10697
1215ab6f3491
Honor Matlab color settings for scatter().
Ben Abbott <bpabbott@mac.com>
parents:
10549
diff
changeset
|
67 if (istart <= nargin && firstnonnumeric > istart) |
1215ab6f3491
Honor Matlab color settings for scatter().
Ben Abbott <bpabbott@mac.com>
parents:
10549
diff
changeset
|
68 c = varargin{istart}; |
7189 | 69 if (isvector (c)) |
10078 | 70 if (columns (c) != 3) |
10549 | 71 c = c(:); |
8257 | 72 endif |
7189 | 73 endif |
12124
cd82f5933c73
scatter: don't recognize 'filled' as a color
John W. Eaton <jwe@octave.org>
parents:
11589
diff
changeset
|
74 elseif (firstnonnumeric == istart && ischar (varargin{istart}) |
cd82f5933c73
scatter: don't recognize 'filled' as a color
John W. Eaton <jwe@octave.org>
parents:
11589
diff
changeset
|
75 && ! strcmpi (varargin{istart}, "filled")) |
10697
1215ab6f3491
Honor Matlab color settings for scatter().
Ben Abbott <bpabbott@mac.com>
parents:
10549
diff
changeset
|
76 c = varargin{istart}; |
7189 | 77 firstnonnumeric++; |
78 else | |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
79 c = []; |
7189 | 80 endif |
81 | |
82 newargs = {}; | |
83 filled = false; | |
84 have_marker = false; | |
85 marker = "o"; | |
86 iarg = firstnonnumeric; | |
87 while (iarg <= nargin) | |
7191 | 88 arg = varargin{iarg++}; |
8190
73d6b71788c0
use case-insensitive comparison for graphics properties; misc style fixes
John W. Eaton <jwe@octave.org>
parents:
7768
diff
changeset
|
89 if (ischar (arg) && strncmpi (arg, "filled", 6)) |
7189 | 90 filled = true; |
7768
a2d9f325b65a
Use isschar instead of deprecated isstr
Rafael Laboissiere <rafael@debian.org>
parents:
7603
diff
changeset
|
91 elseif ((ischar (arg) || iscell (arg)) && ! have_marker) |
8257 | 92 [linespec, valid] = __pltopt__ (fcn, arg, false); |
7189 | 93 if (valid) |
10549 | 94 have_marker = true; |
95 marker = linespec.marker; | |
96 if (strncmp (marker, "none", 4)) | |
97 marker = "o"; | |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
98 elseif (isempty (marker)) |
10701
657e63dcfd88
scatter.m: Properly set default value markersize and marker type.
Ben Abbott <bpabbott@mac.com>
parents:
10697
diff
changeset
|
99 have_marker = false; |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
100 [dummy, marker] = __next_line_style__ (); |
10549 | 101 endif |
7189 | 102 else |
10549 | 103 error ("%s: invalid linespec", fcn); |
7189 | 104 endif |
105 else | |
106 newargs{end+1} = arg; | |
107 if (iarg <= nargin) | |
10701
657e63dcfd88
scatter.m: Properly set default value markersize and marker type.
Ben Abbott <bpabbott@mac.com>
parents:
10697
diff
changeset
|
108 newargs{end+1} = varargin{iarg++}; |
7189 | 109 endif |
110 endif | |
111 endwhile | |
112 | |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
113 if (isempty (c)) |
14846
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14782
diff
changeset
|
114 c = __next_line_color__ (); |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
115 endif |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
116 |
8257 | 117 hg = hggroup (); |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
118 newargs = __add_datasource__ (fcn, hg, {"x", "y", "z", "c", "size"}, |
10549 | 119 newargs{:}); |
8257 | 120 |
121 addproperty ("xdata", hg, "data", x); | |
122 addproperty ("ydata", hg, "data", y); | |
123 addproperty ("zdata", hg, "data", z); | |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
124 if (ischar (c)) |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
125 addproperty ("cdata", hg, "data", __color_str_rgb__ (c)); |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
126 else |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
127 addproperty ("cdata", hg, "data", c); |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
128 endif |
10078 | 129 addproperty ("sizedata", hg, "data", s); |
8257 | 130 addlistener (hg, "xdata", @update_data); |
131 addlistener (hg, "ydata", @update_data); | |
132 addlistener (hg, "zdata", @update_data); | |
133 addlistener (hg, "cdata", @update_data); | |
134 addlistener (hg, "sizedata", @update_data); | |
135 | |
14011
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
136 one_explicit_color = ischar (c) || isequal (size (c), [1, 3]); |
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
137 |
10083
614ad9e7a17b
use patches again in scatter plots
Jaroslav Hajek <highegg@gmail.com>
parents:
10082
diff
changeset
|
138 if (numel (x) <= 100) |
10078 | 139 |
140 ## For small number of points, we'll construct an object for each point. | |
141 | |
142 if (numel (s) == 1) | |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14848
diff
changeset
|
143 s = repmat (s, numel (x), 1); |
10078 | 144 endif |
145 | |
14011
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
146 if (one_explicit_color) |
10078 | 147 for i = 1 : numel (x) |
148 if (filled) | |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
149 h = __go_patch__ (hg, "xdata", x(i), "ydata", y(i), "zdata", z(i,:), |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
150 "faces", 1, "vertices", [x(i), y(i), z(i,:)], |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
151 "facecolor", "none", "edgecolor", "none", |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
152 "marker", marker, "markersize", s(i), |
10697
1215ab6f3491
Honor Matlab color settings for scatter().
Ben Abbott <bpabbott@mac.com>
parents:
10549
diff
changeset
|
153 "markeredgecolor", c, "markerfacecolor", c, |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
154 "linestyle", "none"); |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
155 else |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
156 h = __go_patch__ (hg, "xdata", x(i), "ydata", y(i), "zdata", z(i,:), |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
157 "faces", 1, "vertices", [x(i), y(i), z(i,:)], |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
158 "facecolor", "none", "edgecolor", "none", |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
159 "marker", marker, "markersize", s(i), |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
160 "markeredgecolor", c, "markerfacecolor", "none", |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
161 "linestyle", "none"); |
10078 | 162 endif |
163 endfor | |
164 else | |
14011
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
165 if (rows (c) == 1) |
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
166 c = ones (rows (x), 1) * c; |
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
167 endif |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
168 for i = 1 : numel (x) |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
169 if (filled) |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
170 h = __go_patch__ (hg, "xdata", x(i), "ydata", y(i), "zdata", z(i,:), |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
171 "faces", 1, "vertices", [x(i), y(i), z(i,:)], |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
172 "facecolor", "none", "edgecolor", "none", |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
173 "marker", marker, "markersize", s(i), |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
174 "markeredgecolor", "none", |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
175 "markerfacecolor", "flat", |
12446
f899f451fe76
Fix for fltk patch markers (#31801)
David Bateman <dbateman@free.fr>
parents:
12124
diff
changeset
|
176 "cdata", c(i,:), "facevertexcdata", c(i,:), |
f899f451fe76
Fix for fltk patch markers (#31801)
David Bateman <dbateman@free.fr>
parents:
12124
diff
changeset
|
177 "linestyle", "none"); |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
178 else |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
179 h = __go_patch__ (hg, "xdata", x(i), "ydata", y(i), "zdata", z(i,:), |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
180 "faces", 1, "vertices", [x(i), y(i), z(i,:)], |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
181 "facecolor", "none", "edgecolor", "none", |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
182 "marker", marker, "markersize", s(i), |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
183 "markeredgecolor", "flat", |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
184 "markerfacecolor", "none", |
12446
f899f451fe76
Fix for fltk patch markers (#31801)
David Bateman <dbateman@free.fr>
parents:
12124
diff
changeset
|
185 "cdata", c(i,:), "facevertexcdata", c(i,:), |
f899f451fe76
Fix for fltk patch markers (#31801)
David Bateman <dbateman@free.fr>
parents:
12124
diff
changeset
|
186 "linestyle", "none"); |
10078 | 187 |
188 endif | |
189 endfor | |
190 endif | |
191 | |
8257 | 192 else |
10078 | 193 |
194 ## For larger numbers of points, we split the points by common color. | |
195 | |
196 vert = [x, y, z]; | |
14011
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
197 if (one_explicit_color) |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
198 h = render_size_color (hg, vert, s, c, marker, filled, true); |
10078 | 199 else |
14011
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
200 if (rows (c) == 1) |
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
201 c = ones (rows (x), 1) * c; |
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
202 endif |
13986
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
203 ## We want to group points by colour. So first get all the unique colours |
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
204 [cc, ~, c_to_cc] = unique (c, "rows"); |
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
205 |
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
206 for i = 1:rows (cc) |
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
207 ## Now for each possible unique colour, get the logical index of |
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
208 ## points that correspond to that colour |
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
209 idx = (i == c_to_cc); |
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
210 if (isscalar (s)) |
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
211 h = render_size_color (hg, vert(idx, :), s, c(idx,:), |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
212 marker, filled, true); |
13986
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
213 else |
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
214 h = render_size_color (hg, vert(idx, :), s(idx), c(idx,:), |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
215 marker, filled, true); |
13986
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
216 endif |
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
217 endfor |
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
218 |
7189 | 219 endif |
10078 | 220 endif |
221 | |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
222 if (! ischar (c) && rows (c) > 1) |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
223 ax = get (hg, "parent"); |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
224 clim = get (ax, "clim"); |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14848
diff
changeset
|
225 if (min (c(:)) < clim(1)) |
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14848
diff
changeset
|
226 clim(1) = min (c(:)); |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
227 set (ax, "clim", clim); |
7189 | 228 endif |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14848
diff
changeset
|
229 if (max (c(:)) > clim(2)) |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
230 set (ax, "clim", [clim(1), max(c(:))]); |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
231 endif |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
232 endif |
7189 | 233 |
8257 | 234 addproperty ("linewidth", hg, "patchlinewidth", 0.5); |
235 addproperty ("marker", hg, "patchmarker", marker); | |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
236 if (filled) |
8257 | 237 addproperty ("markeredgecolor", hg, "patchmarkeredgecolor", "none"); |
14011
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
238 if (one_explicit_color) |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
239 addproperty ("markerfacecolor", hg, "patchmarkerfacecolor", c); |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
240 else |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
241 addproperty ("markerfacecolor", hg, "patchmarkerfacecolor", "flat"); |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
242 endif |
8257 | 243 else |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
244 addproperty ("markerfacecolor", hg, "patchmarkerfacecolor", "none"); |
14011
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
245 if (one_explicit_color) |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
246 addproperty ("markeredgecolor", hg, "patchmarkeredgecolor", c); |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
247 else |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
248 addproperty ("markeredgecolor", hg, "patchmarkeredgecolor", "flat"); |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
249 endif |
8257 | 250 endif |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
251 addlistener (hg, "linewidth", @update_props); |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
252 addlistener (hg, "marker", @update_props); |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
253 addlistener (hg, "markerfacecolor", @update_props); |
8257 | 254 addlistener (hg, "markeredgecolor", @update_props); |
255 | |
256 if (! isempty (newargs)) | |
11589
b0084095098e
missing semicolons in script files
John W. Eaton <jwe@octave.org>
parents:
11587
diff
changeset
|
257 set (hg, newargs{:}); |
8257 | 258 endif |
259 | |
7189 | 260 endfunction |
8257 | 261 |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14848
diff
changeset
|
262 function h = render_size_color (hg, vert, s, c, marker, filled, isflat) |
10078 | 263 if (isscalar (s)) |
264 x = vert(:,1); | |
265 y = vert(:,2); | |
266 z = vert(:,3:end); | |
14011
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
267 toolkit = get (ancestor (hg, "figure"), "__graphics_toolkit__"); |
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
268 ## Does gnuplot only support triangles with different vertex colors ? |
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
269 ## TODO - Verify gnuplot can only support one color. If RGB triplets |
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
270 ## can be assigned to each vertex, then fix __go_draw_axe__.m |
15974
53a2fb7b2557
maint: Allow scatter demo to be run under Octave or Matlab for plot comparisons
Rik <octave@nomad.inbox5.com>
parents:
14782
diff
changeset
|
271 gnuplot_hack = (numel (x) > 1 && columns (c) == 3 |
14782
566cf544d020
Fix scatter() for filled markers using gnuplot.
John Hunt <huntj@gmx.us>
parents:
14138
diff
changeset
|
272 && strcmp (toolkit, "gnuplot")); |
14011
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
273 if (ischar (c) || ! isflat || gnuplot_hack) |
10083
614ad9e7a17b
use patches again in scatter plots
Jaroslav Hajek <highegg@gmail.com>
parents:
10082
diff
changeset
|
274 if (filled) |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
275 h = __go_patch__ (hg, "xdata", x, "ydata", y, "zdata", z, |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14848
diff
changeset
|
276 "faces", 1:numel (x), "vertices", vert, |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
277 "facecolor", "none", "edgecolor", "none", |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
278 "marker", marker, |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
279 "markeredgecolor", "none", |
14011
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
280 "markerfacecolor", c(1,:), |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
281 "markersize", s, "linestyle", "none"); |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
282 else |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
283 h = __go_patch__ (hg, "xdata", x, "ydata", y, "zdata", z, |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14848
diff
changeset
|
284 "faces", 1:numel (x), "vertices", vert, |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
285 "facecolor", "none", "edgecolor", "none", |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
286 "marker", marker, |
14011
431c6b00653d
scatter.m: Bug fix (34936).
Ben Abbott <bpabbott@mac.com>
parents:
13988
diff
changeset
|
287 "markeredgecolor", c(1,:), |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
288 "markerfacecolor", "none", |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
289 "markersize", s, "linestyle", "none"); |
10083
614ad9e7a17b
use patches again in scatter plots
Jaroslav Hajek <highegg@gmail.com>
parents:
10082
diff
changeset
|
290 endif |
614ad9e7a17b
use patches again in scatter plots
Jaroslav Hajek <highegg@gmail.com>
parents:
10082
diff
changeset
|
291 else |
614ad9e7a17b
use patches again in scatter plots
Jaroslav Hajek <highegg@gmail.com>
parents:
10082
diff
changeset
|
292 if (filled) |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
293 h = __go_patch__ (hg, "xdata", x, "ydata", y, "zdata", z, |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14848
diff
changeset
|
294 "faces", 1:numel (x), "vertices", vert, |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
295 "facecolor", "none", "edgecolor", "none", |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
296 "marker", marker, "markersize", s, |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
297 "markeredgecolor", "none", |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
298 "markerfacecolor", "flat", |
13988
7ab497513c1a
Fix colour properties in scatter (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13986
diff
changeset
|
299 "cdata", c, "facevertexcdata", c, |
12446
f899f451fe76
Fix for fltk patch markers (#31801)
David Bateman <dbateman@free.fr>
parents:
12124
diff
changeset
|
300 "linestyle", "none"); |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
301 else |
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
302 h = __go_patch__ (hg, "xdata", x, "ydata", y, "zdata", z, |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14848
diff
changeset
|
303 "faces", 1:numel (x), "vertices", vert, |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
304 "facecolor", "none", "edgecolor", "none", |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
305 "marker", marker, "markersize", s, |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
306 "markeredgecolor", "flat", |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
307 "markerfacecolor", "none", |
13988
7ab497513c1a
Fix colour properties in scatter (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13986
diff
changeset
|
308 "cdata", c, "facevertexcdata", c, |
12446
f899f451fe76
Fix for fltk patch markers (#31801)
David Bateman <dbateman@free.fr>
parents:
12124
diff
changeset
|
309 "linestyle", "none"); |
10083
614ad9e7a17b
use patches again in scatter plots
Jaroslav Hajek <highegg@gmail.com>
parents:
10082
diff
changeset
|
310 endif |
10078 | 311 endif |
312 else | |
313 ## FIXME: round the size to one decimal place. It's not quite right, though. | |
13986
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
314 [ss, ~, s_to_ss] = unique (ceil (s*10) / 10); |
10078 | 315 for i = 1:rows (ss) |
13986
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
316 idx = (i == s_to_ss); |
6be49527e4cf
Fix coloured scatter when using more than 100 points (bug #34936)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
13141
diff
changeset
|
317 h = render_size_color (hg, vert(idx,:), ss(i), c, |
10135
4516a0c97ced
Handle linestyleorder. Remove @ markers. Treat edgecolor, markeredgecolor and markerfacecolor correctly in scatter.
David Bateman <dbateman@free.fr>
parents:
10083
diff
changeset
|
318 marker, filled, isflat); |
10078 | 319 endfor |
320 endif | |
321 endfunction | |
322 | |
8257 | 323 function update_props (h, d) |
324 lw = get (h, "linewidth"); | |
325 m = get (h, "marker"); | |
326 fc = get (h, "markerfacecolor"); | |
327 ec = get (h, "markeredgecolor"); | |
328 kids = get (h, "children"); | |
329 | |
330 for i = 1 : numel (kids) | |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
331 set (kids (i), "linewidth", lw, "marker", m, "markerfacecolor", fc, |
11589
b0084095098e
missing semicolons in script files
John W. Eaton <jwe@octave.org>
parents:
11587
diff
changeset
|
332 "edgecolor", ec); |
8257 | 333 endfor |
334 endfunction | |
335 | |
336 function update_data (h, d) | |
337 x1 = get (h, "xdata"); | |
338 y1 = get (h, "ydata"); | |
339 z1 = get (h, "zdata"); | |
340 c1 = get (h, "cdata"); | |
341 if (!ischar (c1) && rows (c1) == 1) | |
342 c1 = repmat (c1, numel (x1), 1); | |
343 endif | |
344 size1 = get (h, "sizedata"); | |
345 if (numel (size1) == 1) | |
346 size1 = repmat (size1, numel (x1), 1); | |
347 endif | |
348 hlist = get (h, "children"); | |
349 if (ischar (c1)) | |
9085
136e72b9afa8
correct indexing of cdata for scatter
David Bateman <dbateman@free.fr>
parents:
8920
diff
changeset
|
350 if (isempty (z1)) |
136e72b9afa8
correct indexing of cdata for scatter
David Bateman <dbateman@free.fr>
parents:
8920
diff
changeset
|
351 for i = 1 : length (hlist) |
10549 | 352 set (hlist(i), "vertices", [x1(i), y1(i)], "cdata", c1, |
353 "markersize", size1(i)); | |
9085
136e72b9afa8
correct indexing of cdata for scatter
David Bateman <dbateman@free.fr>
parents:
8920
diff
changeset
|
354 endfor |
136e72b9afa8
correct indexing of cdata for scatter
David Bateman <dbateman@free.fr>
parents:
8920
diff
changeset
|
355 else |
136e72b9afa8
correct indexing of cdata for scatter
David Bateman <dbateman@free.fr>
parents:
8920
diff
changeset
|
356 for i = 1 : length (hlist) |
10549 | 357 set (hlist(i), "vertices", [x1(i), y1(i), z1(i)], "cdata", c1, |
358 "markersize", size1(i)); | |
9085
136e72b9afa8
correct indexing of cdata for scatter
David Bateman <dbateman@free.fr>
parents:
8920
diff
changeset
|
359 endfor |
136e72b9afa8
correct indexing of cdata for scatter
David Bateman <dbateman@free.fr>
parents:
8920
diff
changeset
|
360 endif |
8257 | 361 else |
9085
136e72b9afa8
correct indexing of cdata for scatter
David Bateman <dbateman@free.fr>
parents:
8920
diff
changeset
|
362 if (isempty (z1)) |
136e72b9afa8
correct indexing of cdata for scatter
David Bateman <dbateman@free.fr>
parents:
8920
diff
changeset
|
363 for i = 1 : length (hlist) |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
364 set (hlist(i), "vertices", [x1(i), y1(i)], "cdata", |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14848
diff
changeset
|
365 reshape (c1(i,:),[1, size(c1)(2:end)]), |
12446
f899f451fe76
Fix for fltk patch markers (#31801)
David Bateman <dbateman@free.fr>
parents:
12124
diff
changeset
|
366 "facevertexcdata", c1(i,:), |
f899f451fe76
Fix for fltk patch markers (#31801)
David Bateman <dbateman@free.fr>
parents:
12124
diff
changeset
|
367 "markersize", size1(i)); |
9085
136e72b9afa8
correct indexing of cdata for scatter
David Bateman <dbateman@free.fr>
parents:
8920
diff
changeset
|
368 endfor |
136e72b9afa8
correct indexing of cdata for scatter
David Bateman <dbateman@free.fr>
parents:
8920
diff
changeset
|
369 else |
136e72b9afa8
correct indexing of cdata for scatter
David Bateman <dbateman@free.fr>
parents:
8920
diff
changeset
|
370 for i = 1 : length (hlist) |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
371 set (hlist(i), "vertices", [x1(i), y1(i), z1(i)], "cdata", |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14848
diff
changeset
|
372 reshape (c1(i,:),[1, size(c1)(2:end)]), |
12446
f899f451fe76
Fix for fltk patch markers (#31801)
David Bateman <dbateman@free.fr>
parents:
12124
diff
changeset
|
373 "facevertexcdata", c1(i,:), |
f899f451fe76
Fix for fltk patch markers (#31801)
David Bateman <dbateman@free.fr>
parents:
12124
diff
changeset
|
374 "markersize", size1(i)); |
9085
136e72b9afa8
correct indexing of cdata for scatter
David Bateman <dbateman@free.fr>
parents:
8920
diff
changeset
|
375 endfor |
136e72b9afa8
correct indexing of cdata for scatter
David Bateman <dbateman@free.fr>
parents:
8920
diff
changeset
|
376 endif |
8257 | 377 endif |
378 endfunction |