Re: rescale gray levels with ListDensityPlot
- To: mathgroup at smc.vnet.net
- Subject: [mg74453] Re: rescale gray levels with ListDensityPlot
- From: dh <dh at metrohm.ch>
- Date: Thu, 22 Mar 2007 01:06:44 -0500 (EST)
- References: <etqo96$14k$1@smc.vnet.net>
Hi Benoit,
here is an example. Note that the ColorFunction is taylormade for the
data range:
d = Table[x^2 - y^2, {x, -1, 1, 0.1}, {y, -1, 1, 0.1}];
ListDensityPlot[d, ColorFunctionScaling -> False,
ColorFunction -> (Hue[0.35*(1 + Sign[#1]), 1, Abs[#1]] & )]
Daniel
Benoit Scheid wrote:
> Hi,
> I have a two-dimensional list of data with positive and negative values.
> I'm using ListDensityPlot and ListCoutourPlot.
> By defaullt, the range of gray levels codes the range of z-values from
> -z_min (black) to z_max (white).
> I would like to have the zero gray level (black) for z=0 and the maximum
> gray level (white) for z=|zmax|. At the same time, I would like to use
> two different colors to discriminate between positive and
> negative values. Is that possible?
> Thanks,
> Ben
>
>