Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6319 > unrolled thread

Re: Graphics << Implicit vs ContourPlot

Started byHeike Gramberg <heike.gramberg@gmail.com>
First post2011-11-10 11:49 +0000
Last post2011-11-10 11:49 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Graphics << Implicit   vs  ContourPlot Heike Gramberg <heike.gramberg@gmail.com> - 2011-11-10 11:49 +0000

#6319 — Re: Graphics << Implicit vs ContourPlot

FromHeike Gramberg <heike.gramberg@gmail.com>
Date2011-11-10 11:49 +0000
SubjectRe: Graphics << Implicit vs ContourPlot
Message-ID<j9gdoa$ogf$1@smc.vnet.net>
Setting Axes -> True, Frame -> False in your ContourPlot will create a 
plot with axes instead of a frame.

To plot the rotated ellipse it's probably easier to use Circle and 
Rotate instead of ContourPlot.  For example, this will plot an ellipse 
with semi-axes 2 and 1 rotated over 45 degrees.

With[{ellipse = Circle[{0, 0}, {2, 1}], angle = 45 Degree},
 Graphics[{ellipse,
  {Red, Rotate[{ellipse, Line[{{-3, 0}, {3, 0}}], Line[{{0, -3}, {0, 
3}}]}, angle]}},
    Axes -> True, PlotRange -> {{-2.1, 2.1}, {-2.1, 2.1}}]]

Heike

On 9 Nov 2011, at 12:24, John Accardi 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.

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web