       Re: color function

• To: mathgroup at smc.vnet.net
• Subject: [mg128363] Re: color function
• From: Barrie Stokes <Barrie.Stokes at newcastle.edu.au>
• Date: Wed, 10 Oct 2012 01:24:12 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• Delivered-to: l-mathgroup@wolfram.com
• Delivered-to: mathgroup-newout@smc.vnet.net
• Delivered-to: mathgroup-newsend@smc.vnet.net
• References: <20121009043807.A9EB96886@smc.vnet.net>

```Hi

Plot3D[x^2 + y^2, {x, -10, 10}, {y, -10, 10},
ColorFunction -> (Which[#1 < 0.2, Hue[.11], True, Hue[.73]] &),
PlotPoints -> 100]

Plot3D[x^2 + y^2, {x, -10, 10}, {y, -10, 10},
ColorFunction -> (Which[#2 < 0.2, Hue[.11], True, Hue[.73]] &),
PlotPoints -> 100]

Plot3D[x^2 + y^2, {x, -10, 10}, {y, -10, 10},
ColorFunction -> (Which[#3 < 0.2, Hue[.11], True, Hue[.73]] &),
PlotPoints -> 100]

Barrie

>>> On 09/10/2012 at 3:38 pm, in message <20121009043807.A9EB96886 at smc.vnet.net>,
Rick C <rick.cangelosi at gmail.com> wrote:
> Hello:
>
> I am working with a contour plot and I am difficulty creating a color
> function which, for example, will color regions on the plane Blue where if z <
> 1 and color regions on the plane Brown if z >= 1.  I tried
>
> ContourPlot[f[x, y], {x, -10, 10}, {y, -10, 10}, ColorFunction -> cfun]
>
> where
>
> cfun[z_] := Which[z < 1, Hue[.12], z >= 1, Hue[.63]]
>