Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Conditional Plotting

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85374] Re: Conditional Plotting
  • From: dh <dh at metrohm.ch>
  • Date: Thu, 7 Feb 2008 22:28:20 -0500 (EST)
  • References: <foeknc$iae$1@smc.vnet.net>


Hi Luko,

define a function g that is 1 if f[x,y]<0 and 0 otherwise. E.g.

f[x_,y_]:=x y;

g[x_,y_]:=If[f[x,y]>0,1,0];

DensityPlot[f[x,y],{x,0,2},{y,0,2}]

hope this helps, Daniel



luko 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

> 




  • Prev by Date: number pattern sequence tia sal2
  • Next by Date: Combinatorica of Steven Skiena and the new Mathematica package
  • Previous by thread: Re: Conditional Plotting
  • Next by thread: helpMathematicaPackages