Re: Conditional Plotting

*To*: mathgroup at smc.vnet.net*Subject*: [mg85371] Re: [mg85362] Conditional Plotting*From*: Bob Hanlon <hanlonr at cox.net>*Date*: Thu, 7 Feb 2008 07:07:56 -0500 (EST)*Reply-to*: hanlonr at cox.net

f[x_, y_] := Sin[x*y]; Plot3D[f[x, y], {x, -Pi, Pi}, {y, -Pi, Pi}] DensityPlot[Boole[f[x, y] < 0], {x, -Pi, Pi}, {y, -Pi, Pi}, ColorFunction -> GrayLevel] Since Boole is new in 5.1, use DensityPlot[If[f[x, y] > 0, 0, 1], {x, -Pi, Pi}, {y, -Pi, Pi}, ColorFunction -> GrayLevel, PlotPoints -> 100] Bob Hanlon ---- luko <lewkow at ariel.ac.il> wrote: > New to Mathematica.. > I would like to plot a function of x and y similar to a DensityPlot, but filled (black) if f(x,y)>0, and not filled for f(x,y)<0. > I use Mathematica 4.2. > Thanx >