Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: AspectRatio -> 1 vs AspectRatio ->1.25

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122790] Re: AspectRatio -> 1 vs AspectRatio ->1.25
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Thu, 10 Nov 2011 06:55:37 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

On 11/9/11 at 6:25 AM, johnaccardi at comcast.net (John Accardi) wrote:

>Goal: Plot both y = x and y = -x such that then intersect visually
>at 90 degrees.

>Intuitively, AspectRatio -> 1 should do this but it takes
>AspectRatio -> 1.25 to accomplish this.

>Am I missing something?  Why 1.25 and not 1?

>Example:

><< 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]

>Produces the desired plot using AspectRatio -> 1.25.

If you really want to figure out why this happens you could dig
through the code that implements this function. My guess since
this is legacy code that implements a functionality that can be
accomplished with the built-in function ContourPlot is it has
something to do with differences in the way graphics worked when
the code was written.

The way to do what you are trying to do is:

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}]

Here the default AspectRation is 1. And you can verify you don't
get a 90 degree angle with AspectRatio 1.25 by doing

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.25]

Note, in suggesting ContourPlot, I am assuming you are using
version 7 or later of Mathematica. I am using version 8 and the
documentation indicates ContourPlot was last changed in version
7. However, it is quite likely (not easily verified by myself)
the change to ContourPlot that eliminated the need for
ImplicitPlot was made in version 6. That is, I am reasonably
certain usage of ImplicitPlot to achieve the graphic would only
apply to version 5 and earlier. And it is the very significant
changes made to the way graphics work in Mathematica in version
6 that lead me to guess this is the source of the issue with ImplicitPlot.




  • Prev by Date: Re: Graphics << Implicit vs ContourPlot
  • Next by Date: Re: Simulate and plot geometric brownian motion
  • Previous by thread: Re: AspectRatio -> 1 vs AspectRatio ->1.25
  • Next by thread: Change $UserBaseDirectory