MathGroup Archive 2009

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

Search the Archive

Combine images, Show[] and its effect on AspectRatio. Plot, Epilog, Circle, Arc

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105402] Combine images, Show[] and its effect on AspectRatio. Plot, Epilog, Circle, Arc
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Tue, 1 Dec 2009 04:14:44 -0500 (EST)
  • Reply-to: "Nasser M. Abbasi" <nma at 12000.org>

Hello,

This is Version 7, Windows.

I make a plot and Mathematica seems to have a good algorithm for coming up 
with an AspectRatio which makes the plot looks good. So when I type

p=Plot[Sin[x],{x,-Pi,Pi}];
AspectRatio/.FullOptions[p]
0.618034

Now, I wanted to add an arc on top of the above plot at some place, say the 
origin, so I type

p=Plot[Sin[x],{x,-Pi,Pi},Epilog->Circle[{0,0},.5,{-45 Degree,180 Degree}]];
AspectRatio/.FullOptions[p]
Out[67]= 0.618034
Show[p]

But due to the aspect ratio used for the Plot itself, you can see that the 
arc is not circular as I expected. So now I typed

p=Plot[Sin[x],{x,-Pi,Pi},AspectRatio->Automatic,Epilog->Circle[{0,0},.5,{-45 
Degree,180 Degree}]];
AspectRatio/.FullOptions[p]
0.31831
Show[p]

Now, the arc is seen as circular, but I lost the good aspect ratio which 
made my Plot look good.

So, I was trying to find how to keep the original Aspect ratio for the plot, 
but keep the arc come up as circular and not turn to some sort of elliptic 
shape as would be the case without the use of Automatic.

I also tried Show[g1,g2] but depending on the order, the AspectRatio changes 
(because Show[] uses information from the first object). So that did not 
help.

So, my problem is that I need to make the plot using the Mathematica 
calculated AspectRatio, but also add an or circle and make that show as a 
circle on the top of the earlier plot, and not have its AspectRatio changed 
by adding the new object. Using AspectRatio->Automatic is not an option, as 
it made my overall plot look not good.

Graphics[]  has 100's of options, and I am looking at them now, may be there 
is something hidden there, but I am not seeing anything yet.

Thanks
--Nasser



  • Prev by Date: Re: part assigned sequence behavior puzzling
  • Next by Date: Re: piecewice pdf, problems with cdf
  • Previous by thread: Re: part assigned sequence behavior puzzling
  • Next by thread: Re: Combine images, Show[] and its effect on AspectRatio. Plot, Epilog, Circle, Arc