MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

color function


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.



  • Prev by Date: Triggering on exception conditions
  • Next by Date: Re: Clearing all variables and definitions: i.e. "resetting" mathematica
  • Previous by thread: Re: Triggering on exception conditions
  • Next by thread: Re: color function