Mercurial > hg > octave-lyh
changeset 7318:5c8f09c7a020
[project @ 2007-12-17 19:02:13 by jwe]
author | jwe |
---|---|
date | Mon, 17 Dec 2007 19:05:04 +0000 |
parents | 11c5f1ee553e |
children | 4a853a9138e7 |
files | liboctave/ChangeLog liboctave/Sparse-op-defs.h scripts/ChangeLog scripts/plot/__go_draw_axes__.m |
diffstat | 4 files changed, 31 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2007-12-17 David Bateman <dbateman@free.fr> + + * Sparse-op-defs.h (SPARSE_ANY_ALL_OP_ROW_CODE): Use ridx for row + index. + 2007-12-11 John W. Eaton <jwe@octave.org> * Sparse.cc (Sparse<T>::index (idx_vector&, int) const):
--- a/liboctave/Sparse-op-defs.h +++ b/liboctave/Sparse-op-defs.h @@ -1697,7 +1697,7 @@ #define SPARSE_ANY_ALL_OP_ROW_CODE(TEST_OP, TEST_TRUE_VAL) \ if (data (i) TEST_OP 0.0) \ { \ - tmp[i] = TEST_TRUE_VAL; \ + tmp[ridx(i)] = TEST_TRUE_VAL; \ break; \ }
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +2007-12-17 David Bateman <dbateman@free.fr> + + * plot/__go_draw_axes__.m: Use "set pm3d explicit" so that + contours can overlay pcolor plots. Priveldge no hidden line + removal when there are multiple objects in the plot. + 2007-12-14 David Bateman <dbateman@free.fr> * plot/contour3.m, plot/__contour__.m: Handle linespec.
--- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -64,7 +64,7 @@ fputs (plot_stream, "set size noratio;\n"); endif - fputs (plot_stream, "set pm3d;\n"); + fputs (plot_stream, "set pm3d explicit;\n"); fputs (plot_stream, "unset label;\n"); if (! isempty (axis_obj.title)) @@ -507,11 +507,11 @@ if (! isnan (xcol) && ! isnan (ycol)) ## Is the patch closed or not if (strncmp (obj.facecolor, "none", 4)) + hidden_removal = false; + else if (isnan (hidden_removal)) - hidden_removal = false; + hidden_removal = true; endif - else - hidden_removal = true; if (nd == 3) error ("gnuplot (as of v4.2) only supports 2D filled patches"); endif @@ -819,11 +819,11 @@ endif usingclause{data_idx} = ""; if (have_newer_gnuplot || isnan (typ)) - withclause{data_idx} = sprintf ("with %s linestyle %d", - style, data_idx); + withclause{data_idx} = sprintf ("with pm3d linestyle %d", + data_idx); else - withclause{data_idx} = sprintf ("with %s linetype %d %s", - style, typ, with); + withclause{data_idx} = sprintf ("with pm3d linetype %d %s", + typ, with); endif xdat = obj.xdata; @@ -883,15 +883,14 @@ || (isnumeric (obj.facecolor) && all (obj.facecolor == 1))); if (strncmp (obj.facecolor, "none", 4)) - if (isnan (hidden_removal)) - hidden_removal = false; - endif + hidden_removal = false; else - hidden_removal = true; + if (isnan (hidden_removal)) + hidden_removal = true; + endif endif - - if (flat_interp_face - || (flat_interp_edge && facecolor_none_or_white)) + + if (flat_interp_edge && facecolor_none_or_white) withclause{data_idx} = "with line palette"; endif @@ -901,22 +900,19 @@ dord = ""; endif - if (facecolor_none_or_white) - ## Ensure faces aren't drawn - fprintf (plot_stream, "unset pm3d;\n"); - elseif (flat_interp_face && strncmp (obj.edgecolor, "flat", 4)) - fprintf (plot_stream, "set pm3d at s %s %s corners2color c3;\n", + if (flat_interp_face && strncmp (obj.edgecolor, "flat", 4)) + fprintf (plot_stream, "set pm3d explicit at s %s %s corners2color c3;\n", interp_str, dord); - else + elseif (!facecolor_none_or_white) if (strncmp (obj.edgecolor, "none", 4)) - fprintf (plot_stream, "set pm3d at s %s corners2color c3;\n", + fprintf (plot_stream, "set pm3d explicit at s %s corners2color c3;\n", interp_str, dord); else edgecol = obj.edgecolor; if (ischar (obj.edgecolor)) edgecol = [0,0,0]; endif - fprintf (plot_stream, "set pm3d at s hidden3d %d %s %s corners2color c3;\n", + fprintf (plot_stream, "set pm3d explicit at s hidden3d %d %s %s corners2color c3;\n", data_idx, interp_str, dord); if (have_newer_gnuplot)