Mercurial > hg > octave-nkf
comparison scripts/plot/plot3.m @ 14184:b33589ef9213 stable
plot3.m: Throw error if the input data exceeds two dimensions.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Mon, 09 Jan 2012 20:32:27 -0500 |
parents | 72c96de7a403 |
children | 11949c9795a0 4d917a6a858b |
comparison
equal
deleted
inserted
replaced
14183:9e6ec5f55827 | 14184:b33589ef9213 |
---|---|
168 endif | 168 endif |
169 endif | 169 endif |
170 | 170 |
171 if (! size_equal (x, y, z)) | 171 if (! size_equal (x, y, z)) |
172 error ("plot3: x, y, and z must have the same shape"); | 172 error ("plot3: x, y, and z must have the same shape"); |
173 elseif (ndims (x) > 2) | |
174 error ("plot3: x, y, and z must not have more than two dimensions"); | |
173 endif | 175 endif |
174 | 176 |
175 for i = 1 : columns (x) | 177 for i = 1 : columns (x) |
176 linestyle = options.linestyle; | 178 linestyle = options.linestyle; |
177 marker = options.marker; | 179 marker = options.marker; |
220 endif | 222 endif |
221 endif | 223 endif |
222 | 224 |
223 if (! size_equal (x, y, z)) | 225 if (! size_equal (x, y, z)) |
224 error ("plot3: x, y, and z must have the same shape"); | 226 error ("plot3: x, y, and z must have the same shape"); |
227 elseif (ndims (x) > 2) | |
228 error ("plot3: x, y, and z must not have more than two dimensions"); | |
225 endif | 229 endif |
226 | 230 |
227 options = __default_plot_options__ (); | 231 options = __default_plot_options__ (); |
228 for i = 1 : columns (x) | 232 for i = 1 : columns (x) |
229 linestyle = options.linestyle; | 233 linestyle = options.linestyle; |
292 endif | 296 endif |
293 endif | 297 endif |
294 | 298 |
295 if (! size_equal (x, y, z)) | 299 if (! size_equal (x, y, z)) |
296 error ("plot3: x, y, and z must have the same shape"); | 300 error ("plot3: x, y, and z must have the same shape"); |
301 elseif (ndims (x) > 2) | |
302 error ("plot3: x, y, and z must not have more than two dimensions"); | |
297 endif | 303 endif |
298 | 304 |
299 options = __default_plot_options__ (); | 305 options = __default_plot_options__ (); |
300 | 306 |
301 for i = 1 : columns (x) | 307 for i = 1 : columns (x) |