Re: ContourPlot, equation and R.H. side of equation_Plotting problem

• To: mathgroup at smc.vnet.net
• Subject: [mg99087] Re: [mg99051] ContourPlot, equation and R.H. side of equation_Plotting problem
• From: "David Park" <djmpark at comcast.net>
• Date: Sun, 26 Apr 2009 01:40:52 -0400 (EDT)
• References: <15500446.1240650564504.JavaMail.root@n11>

```This works:

eqn1 = 3 x^2 + 6 y^2 == 6
ContourPlot[Evaluate@eqn1, {x, -2, 2}, {y, -2, 2}, Axes -> True]

I think this is what might be called a feature. ContourPlot has the
attribute HoldAll. Without the Evaluate it see no x and or y to substitute
values. So you obtain no numeric result and no image. When you enter the
form with the explicit equal sign, Mathematica follows a path that does
evaluate and you get the image of the curve.

The lesson is: when you don't obtain an image when you expect one, and the
plotting parameters are not manifest in the expression, use Evaluate.

David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/

From: Bill [mailto:WDWNORWALK at aol.com]

Hi:

1a.) When I assign 3 x^2 + 6 y^2 == 6 to eqn1, in Mathematica like this:

eqn1=3 x^2 + 6 y^2 == 6;

I can't get ContourPlot to plot eqn1 using this code:

ContourPlot[eqn1, {x, -2, 2}, {y, -2, 2}, Axes -> True]

1b.) If I assign the equation like this without the constant on the R.H.
side in eqn2,
ContourPlot will plot the equation as expected, using the following syntax:

eqn2=3 x^2 + 6 y^2;
ContourPlot[eqn2 == 6, {x, -2, 2}, {y, -2, 2}, Axes -> True]

Question: How can I get method 1a to work? Could you please give me code for
this?

Thanks,

Bill

PS. I'm using Mathematica 6.0.1 w/ Win XP on a PC.

```

• Prev by Date: Re: Copy/paste selection of a pdf on Mac
• Next by Date: Re: ZigZag matrix rearrange
• Previous by thread: Re: ContourPlot, equation and R.H. side of equation_Plotting problem
• Next by thread: Replace elements in structured list