|
From: Aapo L. <aap...@gm...> - 2005-03-22 21:02:05
|
On Tue, 2005-03-22 at 21:15 +0200, Aapo Lankinen wrote:
> Hi!
>
> I noticed something strange using Gnuplot 4.1 CVS (and Gnuplot 4.0,
> too): the following commands
>
> ---- clip ----
> unset surface
> set contour
> set logscale z
> set palette model HSV functions gray, gray, 1.0-0.5*gray
> set log cb
> unset colorbox
> set cntrparam levels 30
> set view 0,0
> splot x**2+y**2+1.0 palette
> ---- clap ----
>
> draw nice coloured contours as you would expect, but the the contour
> labels in the legend are of wrong colour - all the contour label lines
> in the legend have the same colour as the maximum intensity contour
> line. However, the contour label numerical values seem to be correct in
> the legend. This happens with at least x11 and postscript terminals.
> I'm using Debian i386 GNU/Linux (Sarge). Can someone confirm?
Nevermind, I figured it out myself. In the logarithmic mode of the
contour PM3D-plot there is two subsequent log10():s of the z-coordinate
of the legend, which effectively renders the legend line samples to the
same colour. I removed the other de-log, and following patch fixes the
problem at least for me. :-) I hope it does not cause any other
unexpected problems. Can someone check if it's safe? I don't know
anything about Gnuplot except reading the source for an hour :-)
Maybe someone could perhaps apply it to the CVS, if it indeed does work
for others? (diff for contour.c below and attached)
Aapo
--- contour.c 2005-03-22 22:07:26.589004130 +0200
+++ contour.c 2005-03-22 22:08:12.726777705 +0200
@@ -247,7 +247,7 @@
contour_list->isNewLevel = 1;
sprintf(contour_list->label, contour_format,
AXIS_DE_LOG_VALUE(FIRST_Z_AXIS,z));
#ifdef PM3D
- contour_list->z = AXIS_DE_LOG_VALUE(FIRST_Z_AXIS, z);
+ contour_list->z = z;
#endif
}
}
--
Aapo Lankinen <aap...@gm...>
|