Mercurial > hg > octave-nkf
changeset 14095:595ee644fa6f stable
Fix trisurf for gnuplot, bug # 35144.
* __go_draw_axes__.m: For 3D triangular patches, when isempty(cdata) use zdata.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Thu, 22 Dec 2011 10:40:42 -0500 |
parents | 050bc580cb60 |
children | 153581342e47 |
files | scripts/plot/private/__go_draw_axes__.m |
diffstat | 1 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/private/__go_draw_axes__.m +++ b/scripts/plot/private/__go_draw_axes__.m @@ -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);