octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 3.0.1 release?


From: David Bateman
Subject: Re: 3.0.1 release?
Date: Thu, 03 Apr 2008 23:59:06 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080306)

John W. Eaton wrote:
> On 12-Feb-2008, John W. Eaton wrote:
> 
> | Are there any critical patches that should be included or bugs that
> | should be fixed before we make 3.0.1?
> 
> I think most of the reported problems have been fixed, so maybe now
> would be a good time for making a 3.0.1 release.  Any objections?
> 
> Thanks,
> 
> jwe
> 

In the 3.0.1 release candidate "demo plot3" gives the warnings

  Warning: Single isoline (scan) is not enough for a pm3d plot.
           Hint: Missing blank lines in the data file? See 'help pm3d'
and FAQ.

from gnuplot when rotating/zomming with the mouse. I didn't think this
issue was in the 3.0.1 and it has been discussed previously. The problem
is that the "pm3d" flag should not be set for the line objects, but
there was a change introducing "pm3d implicit" in __go_draw_axes__.m.
The reason for this change was that the colorbar doesn't appear for
cases like "contour(peaks); colorbar" due to the fact that the contours
aren't drawn using the palette and gnuplot then automatically decides
that since you didn't use the palette you don't want the colorbar. This
was discussed on

http://www.nabble.com/Re%3A-legend-on-contour-plot-to15390461.html#a15401201

where Petr suggested the use of "set pm3d explicit". Another suggested
fix is to keep "set pm3d implicit" but create a dummy line that uses the
palette outside the range. I prefer the fix where the "set pm3d
implicit" is conditionally not set when there is a single isoline (IE
splot with a single line). The only case this will miss is a contour
with a single contour that I don't consider likely.

This should be applied to both 3.0.x and 3.1.x tress.

D.
# HG changeset patch
# User David Bateman <address@hidden>
# Date 1207259810 -7200
# Node ID 35bfacfc0d4a72a27c0e1c5ae7308436650e455c
# Parent  a11d28668eadca36d810856ad341a0710b93a435
Conditionally set 'set pm3d implicit'

diff --git a/scripts/ChangeLog b/scripts/ChangeLog
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,5 +1,8 @@ 2008-04-03  David Bateman  <address@hidden
 2008-04-03  David Bateman  <address@hidden>
 
+       * plot/__go_draw_axes__.m: Conditionally "set pm3d implict" for 2D
+       plot or 3D plots with more than one line.
+       
        * plot/__patch__.m: Fix for NaN values in faces of patches.
        
        * deprecated/splchol.m deprecated/lchol.m deprecated/spfind.m
diff --git a/scripts/plot/__go_draw_axes__.m b/scripts/plot/__go_draw_axes__.m
--- a/scripts/plot/__go_draw_axes__.m
+++ b/scripts/plot/__go_draw_axes__.m
@@ -64,7 +64,6 @@ function __go_draw_axes__ (h, plot_strea
       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))
@@ -999,6 +998,14 @@ function __go_draw_axes__ (h, plot_strea
       endswitch
 
     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");

reply via email to

[Prev in Thread] Current Thread [Next in Thread]