[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuplot-info-beta
Subject:    Re: Gnuplot logarithmic contours and palette
From:       Aapo Lankinen <aapo.lankinen () gmail ! com>
Date:       2005-06-08 10:52:24
Message-ID: 1118227944.7803.63.camel () localhost ! localdomain
[Download RAW message or body]

On Tue, 2005-06-07 at 19:52 +0200, Hans-Bernhard Bröker wrote:
> As so often, that depends on the background of the person doing the 
> expecting...
> 
> The right way of handling this would have been to do it like the other
> "tick series" things in gnuplot do it, i.e. like 'set xtics'.  Which 
> means the endpoints are numbers in the input format, but the increment
> is a *factor*, not an addition to the logarithm.

That's cool.  I made a new patch that implements it that way.


> So '5,2,200' should have delivered tics at (5,10,20,40,80,160)

Now the z ticks are exactly like that.  And the patch is even
simpler.  :-)


> Taking into account prior art, it is.  It just fails to be implemented 
> that way ;-(

Ok, thank you.  I don't have very deep knowledge of Gnuplot, so I didn't
realise that.  But now it's fixed, see the attached patch.

Best Regards,
Aapo Lankinen

-- 
Aapo Lankinen <aapo.lankinen@gmail.com>

["contourlog.patch" (contourlog.patch)]

Index: src/contour.c
===================================================================
RCS file: /cvsroot/gnuplot/gnuplot/src/contour.c,v
retrieving revision 1.25
diff -u -p -r1.25 contour.c
--- src/contour.c	23 Mar 2005 19:01:54 -0000	1.25
+++ src/contour.c	8 Jun 2005 10:46:53 -0000
@@ -234,7 +234,8 @@ contour(int num_isolines, struct iso_cur
 	    z += dz;
 	    break;
 	case LEVELS_INCREMENTAL:
-	    z = contour_levels_list[0] + i * contour_levels_list[1];
+	    z = AXIS_LOG_VALUE( FIRST_Z_AXIS, contour_levels_list[0] ) +
+	      i * AXIS_LOG_VALUE( FIRST_Z_AXIS, contour_levels_list[1] );
 	    break;
 	case LEVELS_DISCRETE:
 	    z = AXIS_LOG_VALUE(FIRST_Z_AXIS, contour_levels_list[i]);

-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
gnuplot-beta mailing list
gnuplot-beta@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuplot-beta

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic