Re: ContourPlot, equation and R.H. side of
- To: mathgroup at smc.vnet.net
- Subject: [mg99071] Re: [mg99051] ContourPlot, equation and R.H. side of
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sun, 26 Apr 2009 01:37:49 -0400 (EDT)
- Reply-to: hanlonr at cox.net
Try these
ContourPlot[3 x^2 + 6 y^2 == 6,
{x, -2, 2}, {y, -2, 2}, Axes -> True]
Attributes[ContourPlot]
{HoldAll,Protected}
eqn1 = 3 x^2 + 6 y^2 == 6;
ContourPlot[Evaluate[eqn1],
{x, -2, 2}, {y, -2, 2}, Axes -> True]
eqn2 = 3 x^2 + 6 y^2;
ContourPlot[eqn2 == 6,
{x, -2, 2}, {y, -2, 2}, Axes -> True]
ContourPlot[eqn2,
{x, -2, 2}, {y, -2, 2}, Axes -> True,
Contours -> {6}]
Bob Hanlon
---- Bill <WDWNORWALK at aol.com> wrote:
=============
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.