# HG changeset patch # User Avinoam # Date 1435599956 -10800 # Mon Jun 29 20:45:56 2015 +0300 # Node ID 13cd2f526449497a04aa70e2d59e2b931ad1d54f # Parent b6a59cc96bfa22cb92dc63a0b3cdb3f726dbe3ed Partial fix of bug #42561: gnuplot error on "demo trimesh" __go_draw_axes__.m: check if facecolor is none or white. Draw only mesh in this case diff -r b6a59cc96bfa -r 13cd2f526449 scripts/plot/util/private/__go_draw_axes__.m --- a/scripts/plot/util/private/__go_draw_axes__.m Mon Jun 29 08:56:22 2015 -0700 +++ b/scripts/plot/util/private/__go_draw_axes__.m Mon Jun 29 20:45:56 2015 +0300 @@ -37,6 +37,8 @@ parent_figure_obj = get (axis_obj.parent); gnuplot_term = __gnuplot_get_var__ (axis_obj.parent, "GPVAL_TERM"); + facecolor_none_or_white = 0; + ## Set to false for plotyy axes. ymirror = true; if (isfield (axis_obj, "__plotyy_axes__")) @@ -636,6 +638,10 @@ cmap = parent_figure_obj.colormap; [nr, nc] = size (obj.xdata); + facecolor_none_or_white = (strcmp (obj.facecolor, "none") + || (isnumeric (obj.facecolor) + && all (obj.facecolor == 1))); + if (! isempty (obj.cdata)) cdat = obj.cdata; if (strcmpi (obj.cdatamapping, "direct")) @@ -677,7 +683,12 @@ parametric(data_idx) = false; have_cdata(data_idx) = true; have_3d_patch(data_idx) = true; - withclause{data_3d_idx} = sprintf ("with pm3d"); + if (facecolor_none_or_white) + withclause{data_3d_idx} = sprintf ("with lines"); + else + withclause{data_3d_idx} = sprintf ("with pm3d"); + endif + usingclause{data_3d_idx} = "using 1:2:3:4"; data{data_3d_idx} = []; endif @@ -1405,7 +1416,15 @@ ## This is need to prevent warnings for rotations in 3D plots, while ## allowing colorbars with contours. - if (nd == 2 || (data_idx > 1 && ! view_map)) + + if (!isempty(obj)) + if (!isempty (obj.facecolor)) + facecolor_none_or_white = (strcmp (obj.facecolor, "none") + || (isnumeric (obj.facecolor) + && all (obj.facecolor == 1))); + endif + endif + if ((nd == 2 || (data_idx > 1 && ! view_map)) && !facecolor_none_or_white) fputs (plot_stream, "set pm3d implicit;\n"); else fputs (plot_stream, "set pm3d explicit;\n");