|
From: Ethan M. <merritt@u.washington.edu> - 2008-01-05 21:59:45
|
On Saturday 05 January 2008, Petr Mikulik wrote:
> Consequently, there is a bug in 4.3.
> Wasn't it introduced in your patch from 2007-12-18?
I don't think it is at all related. So far as I can determine,
the difference is due to a single line change from back in Aug 2007.
The following patch would return it to 4.2 behavior.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- gnuplot-27aug2007/src/plot2d.c 2007-08-27 12:31:57.000000000 -0800
+++ gnuplot-cvs/src/plot2d.c 2008-01-05 13:41:58.000000000 -0800
@@ -223,7 +223,7 @@
AXIS_INIT2D(SECOND_Y_AXIS, 1);
AXIS_INIT2D(T_AXIS, 0);
AXIS_INIT2D(R_AXIS, 1);
- AXIS_INIT2D(COLOR_AXIS, 0);
+ AXIS_INIT2D(COLOR_AXIS, 1);
t_axis = (parametric || polar) ? T_AXIS : FIRST_X_AXIS;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
However. I do not agree that in the case of image plots the 4.2 behavior is
correct.
The plot produced by 4.2 shows a color range in which black indicates a pixel
value, in this case log(f(x,y)), less than 0.1.
But these pixel values are not, in fact, less than 0.1. They are entirely
undefined because log(x<0) is undefined. I think that the correct behavior
would be to not draw these pixels at all. This is exactly analogous to your
previous example of autoscaling 'plot [-10:10] log(x)'. The y values
corresponding to x<0 are not shown as zero; they are not drawn at all.
I take your point that one case in which pixel values are undefined is the
case of taking the log of an experimentally measured value near 0 in the
presence of finite experimental error. But that is not the general case.
For example, the matrix data file you posted at the start of this thread
contained values evenly distributed on both sides of zero. It was not
obvious that the values were expected to be all positive.
--
Ethan Merritt
(on the road)
|