Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12031 > unrolled thread
| Started by | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| First post | 2012-10-10 05:34 +0000 |
| Last post | 2012-10-10 05:34 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: color function Bob Hanlon <hanlonr357@gmail.com> - 2012-10-10 05:34 +0000
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Date | 2012-10-10 05:34 +0000 |
| Subject | Re: color function |
| Message-ID | <k531de$949$1@smc.vnet.net> |
http://reference.wolfram.com/mathematica/ref/ColorFunctionScaling.html
f[x_, y_] = Cos[x] + Cos[y];
cfun[z_] := Which[z < 1, Hue[.12], True, Hue[.63]]
ContourPlot[f[x, y], {x, -10, 10}, {y, -10, 10},
ColorFunction -> cfun,
ColorFunctionScaling -> False]
Bob Hanlon
On Tue, Oct 9, 2012 at 12:38 AM, Rick C <rick.cangelosi@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]]
>
> Thanks in advance for any help you can provide.
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web