# HG changeset patch # User Ben Abbott # Date 1324568442 18000 # Node ID 595ee644fa6fa99181a58405045af62453d408e2 # Parent 050bc580cb60ededa338d86de5f88763687db1ca Fix trisurf for gnuplot, bug # 35144. * __go_draw_axes__.m: For 3D triangular patches, when isempty(cdata) use zdata. diff -r 050bc580cb60 -r 595ee644fa6f scripts/plot/private/__go_draw_axes__.m --- a/scripts/plot/private/__go_draw_axes__.m Wed Dec 21 19:46:57 2011 -0800 +++ b/scripts/plot/private/__go_draw_axes__.m Thu Dec 22 10:40:42 2011 -0500 @@ -694,11 +694,25 @@ else ccol = cdat; endif + if (strncmp (obj.facecolor, "interp", 6) && nd == 3 + && numel (xcol) == 3 && isempty (ccol)) + ## FIXME - Use isonormals to render interpolated + ## triangular patches. + obj.facecolor = "flat"; + endif if (strncmp (obj.facecolor, "flat", 4)) - if (numel(ccol) == 3) + if (numel (ccol) == 3) color = ccol; elseif (nd == 3 && numel (xcol) == 3) - ccdat = ccol * ones (3,1); + if (isempty (ccol)) + z = mean (zcol); + nr = size (cmap, 1); + r = interp1 (linspace (clim(1), clim(2), nr), + (1:nr), z, "nearest", "extrap"); + color = cmap (r, :); + else + ccdat = ccol * ones (3,1); + endif else if (cdatadirect) r = round (ccol);