# HG changeset patch # User Rik # Date 1380843762 25200 # Node ID e48a22b94727e8c97600b67daccc784a55666dd4 # Parent 58039875767d8879c6928beb41ae3847a9e29cb1 Don't plot NaN values in cdata (bug #40114). * libinterp/corefcn/gl-render.cc(draw_surface): Check colordata for NaNs in addition to x,y,z data and set clip() matrix appropriately. diff -r 58039875767d -r e48a22b94727 libinterp/corefcn/gl-render.cc --- a/libinterp/corefcn/gl-render.cc Thu Oct 03 16:56:36 2013 -0400 +++ b/libinterp/corefcn/gl-render.cc Thu Oct 03 16:42:42 2013 -0700 @@ -1600,6 +1600,9 @@ i1 = i2 = j1 = j2 = 0; + if ((fc_mode > 0 && fc_mode < 3) || ec_mode > 0) + c = props.get_color_data ().array_value (); + boolMatrix clip (z.dims (), false); for (int i = 0; i < zr; i++) @@ -1613,12 +1616,11 @@ j1 = j; clip(i,j) = is_nan_or_inf (x(i1,j), y(i,j1), z(i,j)); + if (fc_mode == 1 || fc_mode == 2) + clip(i,j) |= (xisnan (c(i,j)) || xisinf (c(i,j))); } } - if ((fc_mode > 0 && fc_mode < 3) || ec_mode > 0) - c = props.get_color_data ().array_value (); - if (fa_mode > 0 || ea_mode > 0) { // FIXME: implement alphadata conversion