Re: Re: Combine images, Show[] and its effect
- To: mathgroup at smc.vnet.net
- Subject: [mg105429] Re: [mg105422] Re: [mg105402] Combine images, Show[] and its effect
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Wed, 2 Dec 2009 06:26:38 -0500 (EST)
- Reply-to: hanlonr at cox.net
I forgot to compensate for the different scales on the axes. It should be p = Plot[Sin[x], {x, -Pi, Pi}, Epilog -> Circle[{0, 0}, .5 {Pi/GoldenRatio, 1}, {-45 Degree, 180 Degree}]] Bob Hanlon ---- Bob Hanlon <hanlonr at cox.net> wrote: ============= The original aspect ratio is 1/GoldenRatio // N 0.618034 If you want a circle using that aspect ratio, then draw an ellipse p = Plot[Sin[x], {x, -Pi, Pi}, Epilog -> Circle[{0, 0}, .5 {GoldenRatio, 1}, {-45 Degree, 180 Degree}]] Bob Hanlon ---- "Nasser M. Abbasi" <nma at 12000.org> wrote: ============= 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