changeset 11732:5892d5533b2b release-3-0-x

Conditionally set 'set pm3d implicit'
author David Bateman <dbateman@free.fr>
date Thu, 03 Apr 2008 21:41:27 -0400
parents cf2fc7338195
children b5bbcaa70105
files scripts/ChangeLog scripts/plot/__go_draw_axes__.m
diffstat 2 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Thu Apr 03 14:09:49 2008 -0400
+++ b/scripts/ChangeLog	Thu Apr 03 21:41:27 2008 -0400
@@ -1,3 +1,8 @@
+2008-04-03  David Bateman  <dbateman@free.fr>
+
+	* plot/__go_draw_axes__.m: Conditionally "set pm3d implict" for 2D
+	plot or 3D plots with more than one line.
+	
 2008-04-02  John W. Eaton  <jwe@octave.org>
 
 	* plot/Makefile.in (SOURCES): Add __plt2sv__.m and __plt2vs__.m to
--- a/scripts/plot/__go_draw_axes__.m	Thu Apr 03 14:09:49 2008 -0400
+++ b/scripts/plot/__go_draw_axes__.m	Thu Apr 03 21:41:27 2008 -0400
@@ -64,7 +64,6 @@
       fputs (plot_stream, "set size noratio;\n");
     endif
 
-    fputs (plot_stream, "set pm3d implicit;\n");
     fputs (plot_stream, "unset label;\n");
 
     if (! isempty (axis_obj.title))
@@ -1000,6 +999,14 @@
 
     endfor
 
+    ## This is need to prevent warnings for rotations in 3D plots, while
+    ## allowing colorbars with contours..
+    if (nd == 2 || data_idx > 1)
+      fputs (plot_stream, "set pm3d implicit;\n");
+    else
+      fputs (plot_stream, "set pm3d explicit;\n");
+    endif
+
     if (isnan(hidden_removal) || hidden_removal)
       fputs (plot_stream, "set hidden3d;\n");
     else