Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Boolean constraints in plot functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89963] Boolean constraints in plot functions
  • From: Cca <cca at gregosetroianos.mat.br>
  • Date: Wed, 25 Jun 2008 06:27:55 -0400 (EDT)
  • Reply-to: Cca <cca at gregosetroianos.mat.br>

Hello,

Now that we have "arbitrary plotting regions" in Mathematica 6, would it not be more natural (and easier) to allow for arbitray Boolean combinations in plot functions? (Consider RegionPlot.) For example, instead of

Plot[f[x], {x, a, b},
 RegionFunction -> Function[{x, y}, ineq]
 ]

it should be possible to simply write

Plot[f[x] && ineq, {x, a, b}]

Well, to my surprise, I just discovered that this works (even in Mathematica 5.1)! Example:

Plot[x^2 && -1 < x < 1, {x, -4, 4},
 PlotRange -> {-4, 4}]

However, it doest not work for ContourPlot:

ContourPlot[y == x^2 && -1 < x < 1, {x, -4, 4}, {y, -4, 4}]

Why not? Can anyone elaborate on this? What about other plot functions?


Carlos César de Araújo
Gregos & Troianos Educacional
http://www.gregosetroianos.mat.br
Belo Horizonte, MG, Brasil
(31) 3283-1122



  • Prev by Date: Re: Package File for Different Mathematica Versions
  • Next by Date: Re: Symbolic complex conjugation?
  • Previous by thread: Re: FullSimplify fails for very large numbers and powers
  • Next by thread: Piecewise and multiple values