changeset 13779:7c0fcabd1a66

__patch__: fix thinko in previous change. * __patch__.m (setdata): Correctly index NaN values and last non-NaN value in column.
author John W. Eaton <jwe@octave.org>
date Tue, 01 Nov 2011 13:30:23 -0400
parents b0b6aa4f7302
children 990762e784fe
files scripts/plot/private/__patch__.m
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/private/__patch__.m	Tue Nov 01 13:19:10 2011 -0400
+++ b/scripts/plot/private/__patch__.m	Tue Nov 01 13:30:23 2011 -0400
@@ -239,9 +239,9 @@
   nc = size (faces, 1);
   idx = faces .';
   t1 = isnan (idx);
-  for i = find (any(t1))
-    first_idx_in_column = find (idx(:,i), 1);
-    idx(first_idx_in_column+1:end,i) = idx(first_idx_in_column,i);
+  for i = find (any (t1))
+    first_idx_in_column = find (t1(:,i), 1);
+    idx(first_idx_in_column:end,i) = idx(first_idx_in_column-1,i);
   endfor
   x = reshape (vert(:,1)(idx), size (idx));
   y = reshape (vert(:,2)(idx), size (idx));