octave-maintainers
[Top][All Lists]
Advanced

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

Re: legend on contour plot


From: David Bateman
Subject: Re: legend on contour plot
Date: Tue, 12 Feb 2008 13:11:00 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20070914)

Petr Mikulik wrote:
> Actually, there is a very easy solution: replace
>   set pm3d explicit;
> by
>   set pm3d implicit;
> and the colorbar is back.
>
>   
Well looking at the change log of why this change was made, the reason
is given as

2007-12-17  David Bateman  <address@hidden>

        * plot/__go_draw_axes__.m: Use "set pm3d explicit" so that
        contours can overlay pcolor plots. Privilege no hidden line
        removal when there are multiple objects in the plot.


That is

pcolor(peaks);hold on; contour(peaks,'k')

has the contour lines in front. However, the proposed change doesn't
seem to alter this, so this seem to be the right thing to do.. Now for
the missing cbtics.. In fact I see the cbtics with gnuplot 4.2.2 and not
with gnuplot 4.2 with the script as sent with "set pm3d implicit"..
"show cbtics" gives exactly the same information in both cases.. I
therefore suspect that this is a gnuplot 4.2 bug with user positioned
colorbars, though correct me if I'm wrong.. So I therefore propose to do
nothing about this. Patch attached


D.






-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary

# HG changeset patch
# User David Bateman
# Date 1202817542 -3600
# Node ID 08aa4010f3a56925b8ad6422396a57a09ecde2f4
# Parent  ab69b6c654cb6582394164e11bd32d9941425d04
Fix colorbar with contours

diff -r ab69b6c654cb -r 08aa4010f3a5 scripts/ChangeLog
--- a/scripts/ChangeLog Sat Feb 09 23:12:02 2008 +0100
+++ b/scripts/ChangeLog Tue Feb 12 12:59:02 2008 +0100
@@ -1,3 +1,8 @@ 2008-02-08  Kostas Poulios <poulios.kons
+2008-02-12  David Bateman  <address@hidden
+
+       * plot/__go_draw_axes__.m: Set pm3d implict to fix colorbars on
+       contour plots.
+
 2008-02-08  Kostas Poulios <address@hidden>
 
        * plot/__quiver__.m: make arrow head be in z-plane of the arrow
diff -r ab69b6c654cb -r 08aa4010f3a5 scripts/plot/__go_draw_axes__.m
--- a/scripts/plot/__go_draw_axes__.m   Sat Feb 09 23:12:02 2008 +0100
+++ b/scripts/plot/__go_draw_axes__.m   Tue Feb 12 12:59:02 2008 +0100
@@ -64,7 +64,7 @@ function __go_draw_axes__ (h, plot_strea
       fputs (plot_stream, "set size noratio;\n");
     endif
 
-    fputs (plot_stream, "set pm3d explicit;\n");
+    fputs (plot_stream, "set pm3d implicit;\n");
     fputs (plot_stream, "unset label;\n");
 
     if (! isempty (axis_obj.title))
@@ -1181,6 +1181,7 @@ function __go_draw_axes__ (h, plot_strea
                 "set palette file \"-\" binary record=%d using 1:2:3:4;\n",
                 cmap_sz);
        fwrite (plot_stream, [1:cmap_sz; cmap.'], "float32");
+       fwrite (plot_stream, "\n");
       else
        fputs (plot_stream, "set palette defined (");
        for i = 1: cmap_sz

reply via email to

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