Mercurial > octave-nkf
comparison scripts/plot/private/__patch__.m @ 13698:276bb0dd9d24
patch: ensure facevertexcdata has correct shape
* __patch__.m (setvertexdata): If c is a 2-d matrix, smash it to a
vector after transposing.
* patch.m: New test.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 13 Oct 2011 13:38:19 -0400 |
parents | 9a83ec29aec9 |
children | b0b6aa4f7302 |
comparison
equal
deleted
inserted
replaced
13697:0f8ff98929b2 | 13698:276bb0dd9d24 |
---|---|
320 if (ndims (c) == 3) | 320 if (ndims (c) == 3) |
321 fvc = reshape (c, size (c, 1) * size (c, 2), size(c, 3)); | 321 fvc = reshape (c, size (c, 1) * size (c, 2), size(c, 3)); |
322 elseif (isvector (c)) | 322 elseif (isvector (c)) |
323 fvc = c(:); | 323 fvc = c(:); |
324 else | 324 else |
325 fvc = c.'; | 325 fvc = c.'(:); |
326 endif | 326 endif |
327 | 327 |
328 args = {"faces", faces, "vertices", vert, "facevertexcdata", fvc, args{:}}; | 328 args = {"faces", faces, "vertices", vert, "facevertexcdata", fvc, args{:}}; |
329 endfunction | 329 endfunction |
330 | 330 |