Re: ColorFunction Range (Mathematica v7)
- To: mathgroup at smc.vnet.net
- Subject: [mg99958] Re: ColorFunction Range (Mathematica v7)
- From: dh <dh at metrohm.com>
- Date: Wed, 20 May 2009 04:59:07 -0400 (EDT)
- References: <guu2l8$6d8$1@smc.vnet.net>
Hi Constantinos,
try:
DensityPlot[f[x, y], {x, 0, 1}, {y, 0, 1},
ColorFunctionScaling -> True]
DensityPlot[f[x, y], {x, 0, 1}, {y, 0, 1},
ColorFunctionScaling -> False]
In the first case, the color function receives a scaled argument in the
range [0,1]. If ColorFunctionScaling -> False, the color function
receives the actual value of the function, in our case: [0,2], giving
the same color if the value is larger than 1.
You can convince yourself by e.g. changing the color function to:
ColorFunction -> (Hue[Mod[#, 1]] &)
Daniel
Constantinos wrote:
> Hi All,
>
> Does anyone know how I can change the "Range" value of a preset
> ColorFunction (e.g. "TemperatureMap") in DensityPlot?
>
> I am facing the following problem:
>
> Let's say that the min and max values of your plotting function (not the
> color one) are fmin and fmax, respectively. Let's also assume that you set
> PlotRange->{pmin,pmax}.
> If pmax is lower than fmax then the highest valued color (Red) corresponds
> to pmax but if pmax is higher than fmax the highest valued color (Red)
> corresponds to fmax. Note that we have similar situation for the minimum
> values fmin and pmin.
>
> How can I assign the highest (lowest) valued color of a preser ColorFunction
> to the desired value whatever it is.
>
>
> Thanks in advance.
>
> Constantinos
>
>
>
>