MathGroup Archive 2007

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

Search the Archive

Re: AspectRatio with ContourPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84504] Re: AspectRatio with ContourPlot
  • From: "David Park" <djmpark at comcast.net>
  • Date: Mon, 31 Dec 2007 02:57:27 -0500 (EST)
  • References: <fl6qmq$kjf$1@smc.vnet.net>

The expression you copied into the posting is not proper for evaluation. 
What I do is select the cell contents, right click, use CopyAs Input Text 
and then paste into the posting.

ContourPlot[(x + 10)^2 + (y - 7)^2 == 25, {x, -16, -2}, {y, 0, 12},
 AspectRatio -> Automatic]

This works properly and gives a circular contour. The default aspect ratio 
for ContourPlot is AspectRatio -> 1, perhaps because some user generated 
contour plots might give extreme aspect ratios.

With the Presentations package one obtains a plot centered on the circle 
because the default plot options are PlotRange->Automatic and 
AspectRatio->Automatic.

Needs["Presentations`Master`"]

Draw2D[
 {ContourDraw[(x + 10)^2 + (y - 7)^2 == 25, {x, -16, -2}, {y, 0, 12}]},
 Frame -> True]

Or, if you wanted to work with complex numbers and use a single complex 
iterator you could use:

With[
 {center = -10 + \[ImaginaryI] 7,
  zspan = 5 (1 + \[ImaginaryI])},
 Draw2D[
  {ComplexCartesianContour[
    Abs[z - center] == Sqrt[25], {z, center - zspan,  center + zspan}]},
  Frame -> True]
 ]

Or if you wanted to work with ComplexPolar[modulus,argument] numbers we 
could again write with a single complex iterator.

With[
 {center = -10 + \[ImaginaryI] 7,
  zmin = ComplexPolar[0, -\[Pi]],
  zmax = ComplexPolar[5.1, \[Pi]]},
 Draw2D[
  {ComplexPolarContour[
    Abs[z - center] == Sqrt[25], {z, zmin, zmax, center}]},
  Frame -> True]
 ]


-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


"Jaccard Florian" <Florian.Jaccard at he-arc.ch> wrote in message 
news:fl6qmq$kjf$1 at smc.vnet.net...
> Hello everybody !
>
>
>
> I'm trying to get used to v.6.0.
>
> I miss the ImplicitPlot which did what I wanted... ContourPlot is a bit
> more stuffy, I believe...
>
> Can somebody explain why the circle doesn't come out as a circle, i.e.
> why AspectRatio->Automatic doesn't work in the following example ?
>
>
>
> ContourPlot[(x+10)2+(y-7)2=A925,{x,-16,-2},{y,0,12},AspectRatio(r)Automatic]
>
>
>
> Thanks in advance !
>
>
>
> $Version
>
> 6.0 for Microsoft Windows (32-bit) (June 19, 2007)
>
>
>
> Regards
>
>
>
> F.Jaccard
>
>
> 



  • Prev by Date: Unevaluated limit
  • Next by Date: Re: Unevaluated limit
  • Previous by thread: RE: AspectRatio with ContourPlot
  • Next by thread: How do I linebreak a notebook in XHTML+MathML format?