Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6326
| From | Stefan Salanski <wutchamacallit27@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Graphics << Implicit vs ContourPlot |
| Date | 2011-11-10 11:58 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j9ge9l$orp$1@smc.vnet.net> (permalink) |
| References | <j9doii$b4h$1@smc.vnet.net> |
On Nov 9, 6:35 am, John Accardi <johnacca...@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.
Under documentation for ContourPlots -> Options -> Axes, the first
example right there is to turn off the framed tick marks and turn on
the traditional axes.
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}, {x, -3, 3}, {y, -3, 3},
AspectRatio -> 1, Axes -> True, Frame -> False]
Also, in response to your other post about the aspect ratio needing to
be 1.25 to get 90 degree intersections, this is not the case for me.
aspect ratio 1 works as I would expect it to. maybe your monitor/
projector has a distorted aspect ratio?
Try using AspectRatio -> Automatic, which should give a "natural"
aspect ratio (as mentioned in ContourPlots->Options->AspectRatio)
-Stefan Salanski
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
Graphics << Implicit vs ContourPlot John Accardi <johnaccardi@comcast.net> - 2011-11-09 11:35 +0000 Re: Graphics << Implicit vs ContourPlot Stefan Salanski <wutchamacallit27@gmail.com> - 2011-11-10 11:58 +0000
csiph-web