Mercurial > octave
changeset 21700:e6fcaea7d433
Properly handle 'flat' face color for gnuplot graphics toolkit (bug #47911).
* __gnuplot_draw_axes__.m: Get color from obj.cdata in case of 'flat' facecolor
in addition to 'none' or [1 1 1]. Remove gnuplot style qualifier 'linecolor
rgb variable' in the case of 'flat' facecolor.
author | Daniel J Sebald <daniel.sebald@ieee.org> |
---|---|
date | Sat, 14 May 2016 01:48:00 -0500 |
parents | 21fdab18f857 |
children | 19e8eddd4773 |
files | scripts/plot/util/private/__gnuplot_draw_axes__.m |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/util/private/__gnuplot_draw_axes__.m Fri May 13 18:59:29 2016 -0500 +++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m Sat May 14 01:48:00 2016 -0500 @@ -1174,14 +1174,13 @@ zz(:,kk) = xdat(:,k); zz(:,kk+1) = ydat(:,k); zz(:,kk+2) = zdat(:,k); - zz(:,kk+3) = cdat(:,k); - if (facecolor_none_or_white) + if (flat_interp_face || facecolor_none_or_white) zz(:,kk+3) = cdat(:,k); else ## Convert color to 24-bit RGB zz(:,kk+3) = hex2dec (sprintf ("%02x%02x%02x", round (255*obj.facecolor))); - endif + endif k += 1; endfor data{data_idx} = zz.'; @@ -1229,7 +1228,12 @@ endif else hidden_removal = true; - withclause{data_idx} = sprintf ("with pm3d linecolor rgb variable"); + if (flat_interp_face) + color_source = ""; + else + color_source = " linecolor rgb variable"; + endif + withclause{data_idx} = sprintf ("with pm3d%s", color_source); if (doing_interp_color) ## "depthorder" interferes with interpolation of colors.