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

MathGroup Archive 2011

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

Search the Archive

Re: Graphics << Implicit vs ContourPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122786] Re: Graphics << Implicit vs ContourPlot
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Thu, 10 Nov 2011 06:54:53 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201111091124.GAA11084@smc.vnet.net>

Manipulate[
 m = 2;
 t = theta Degree;
 del = 0.25;
 ContourPlot[{
   (x Cos[t] + y Sin[t])^2/a^2 + (x Sin[t] - y Cos[t])^2/b^2 == 1,
   y == x, y == -x},
  {x, -m, m}, {y, -m, m},
  Frame -> False,
  Axes -> True,
  PlotRange -> 1.05 {{-m, m}, {-m, m}}],
 {{a, 2}, del, m, del, Appearance -> "Labeled"},
 {{b, 1}, del, m, del, Appearance -> "Labeled"},
 {{theta, 0}, -180, 180, 15, Appearance -> "Labeled"}]


Bob Hanlon


On Wed, Nov 9, 2011 at 6:24 AM, John Accardi <johnaccardi at comcast.net> wrote:
> Goal: Show students a plot of both an ellipse with x axis as ellipse's
> transverse axis
> and the same ellipse in an x'y' coordinate plane that is rotated some angle
> with respect the the original xy coordinate plane.  (All in one plot)
>
> I used:
>
> << Graphics`ImplicitPlot`; ImplicitPlot[{7 x^2 - 6 Sqrt[3] x y +
>     13 y^2 - 16 == 0, ((x^2)/2^2) + ((y^2)/2^2) == 1, y ==
= x,
>   y == -x}, {x, -3, 3}, AspectRatio -> 1.25]
>
> which works well but I had to hard fix the axis of rotation at 45 degrees
> and plot it (y == x and y == -x).  I also get an obsolete warning and
> the suggestion to use the new ContourPlot for this in the future:
>
> General::obspkg: "\!\(\"Graphics`ImplicitPlot`\"\) is now obsolete.
> The legacy version being loaded may conflict with current Mathematica
> functionality. See the Compatibility Guide for updating information."
>
> So I try to accomplish the same graph with ContourPlot:
>
> ContourPlot[{7 x^2 - 6 Sqrt[3] x y + 13 y^2 - 16 ==
>    0, ((x^2)/2^2) + ((y^2)/2^2) == 1, y == x, y == -x, y == 0,
>   x == 0}, {x, -3, 3}, {y, -3, 3}, AspectRatio -> 1.25]
>
> which gets me close but I have lost traditional plotting of the xy axes
> (no tick marks).  Instead I get ContourPlots boxed style coordinate system.
>
> Question: How can I get my old style axes back in the context of
> ContourPlot?
>
> Thank you for any insights.
>



  • Prev by Date: Re: Graphics << Implicit vs ContourPlot
  • Next by Date: Re: AspectRatio -> 1 vs AspectRatio ->1.25
  • Previous by thread: Re: Graphics << Implicit vs ContourPlot
  • Next by thread: Re: Graphics << Implicit vs ContourPlot