MathGroup Archive 2006

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

Search the Archive

Re: Plot equations and inequalities together


Bonny wrote:
> I am not being able to plot graphs of equations and inequalities together,
> for e.g. (x==5 && y==10) || (x>5 && y==15). I tried InequalityPlot but that
> does not work; it plots only inequalities. Can anyone tell me a command (or
> a combination of commands or a graphics package) in Mathematica that I can
> use to plot graphs of equations and inequalities together similar to the
> example above?
>
> Thanks much.

The Boole function might be what you need.

DensityPlot[Boole[(x==5 && y==10) || (x>5 && y==15)],{x, 0, 20}, {y, 0,
20}]

seems to show your regions.  You might play around with PlotPoints, but
some, probably most, values for PlotPoints will miss your point and
line region.  To make your regions a little more easily hit on in a
plot you might replace quantities like x==5 with Abs[x-5]<some small
value.

Dennis


  • Prev by Date: Re: Writing prime factor decomposision in conventional form
  • Next by Date: Re: Writing prime factor decomposision in conventional form
  • Previous by thread: Plot equations and inequalities together
  • Next by thread: Sum problem