RE: RE:Need Help: Can not use Ticks under PolarPlot
- To: mathgroup at smc.vnet.net
- Subject: [mg71415] RE: [mg71397] RE:Need Help: Can not use Ticks under PolarPlot
- From: "David Park" <djmp at earthlink.net>
- Date: Fri, 17 Nov 2006 04:30:48 -0500 (EST)
It occurred to me that you wanted to actually mark angles on the curves or see how the angle correlated with the two curves. The following is an animation that marks the points on the two curves, with dim gray arrows from the origin, and displays the value of the angle for each frame. Needs["DrawGraphics`DrawingMaster`"] xyticks = CustomTicks[Identity, {-0.5, 1, 0.5, 5}]; toprightticks = CustomTicks[Identity, {-0.5, 1, 0.5, 5}, CTNumberFunction -> ("" &)]; frame[t_] := Draw2D[ {Hue[0.6], DrawPolarR[Sin[x], {x, -(Pi/2), Pi/2}], Hue[0.8], DrawPolarR[Cos[x], {x, -(Pi/2), Pi/2}], DimGray, Arrow[{0, 0}, Sin[t]*{Cos[t], Sin[t]}, HeadCenter -> 0.5], Arrow[{0, 0}, Cos[t]*{Cos[t], Sin[t]}, HeadCenter -> 0.5], CirclePoint[Sin[t]*{Cos[t], Sin[t]}, 3, Black, Hue[0.6]], CirclePoint[Cos[t]*{Cos[t], Sin[t]}, 3, Black, Hue[0.8]], Black, Text["Sin", {0.301989, 0.979283}, {-1, 0}], Text["Cos", {0.832366, 0.448907}, {-1, 0}], Text["\[Theta] = "NumberForm[N[t], {3, 2}, NumberPadding -> {" ", "0"}], {0.7, 1}, {-1, 0}]}, AspectRatio -> Automatic, Frame -> True, FrameTicks -> {xyticks, xyticks, toprightticks, toprightticks}, Axes -> True, AxesStyle -> LightGray, AxesFront -> False, PlotRange -> {{-0.6, 1.1}, {-0.6, 1.1}}, PlotLabel -> "PolarPlots of Sin and Cos", Background -> Linen, ImageSize -> 350]; Animate[frame[t], {t, -Pi/2, Pi/2 - Pi/42, Pi/42}] SelectionMove[EvaluationNotebook[], All, GeneratedCell] FrontEndTokenExecute["OpenCloseGroup"]; Pause[0.5]; FrontEndExecute[{FrontEnd`SelectionAnimate[200, AnimationDisplayTime -> 0.1, AnimationDirection -> Forward]}] David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: abdou.oumaima at hotmail.com [mailto:abdou.oumaima at hotmail.com] First of All, I want to thank Mr Jean Marc Guillet and Mr Bob Hanlon for their help in my last post. Now I need to perfom my graphic presentation by using Ticks under PolarPlot as follow: Needs["Graphics`"]; ShowLegend[DisplayTogether[PolarPlot[Sin[x], {x, -Pi/2, Pi/2}, PlotStyle -> Hue[0.6]], PolarPlot[Cos[x], {x, Pi/2, 3 Pi/2}, PlotStyle -> Hue[0.8]], Ticks -> {{-Pi/2, 0, Pi/2, Pi, 3 Pi/2}, Automatic}, DisplayFunction -> Identity], {{{ Hue[0.6], "Sin(x)"}, {Hue[0.8], "Cos(x)"}}, LegendPosition -> {1.1, .2}, LegendSize -> {.8, .4}}]; I need seeing in x Axe -Pi/2, 0, Pi/2, Pi, 3P/2. Please how can I achieve this?! Any suggestions will be very welcommmmmmmmmmmm. Cheers. Link to the forum page for this post: http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?pageName=Speci al:Forum_ViewTopic&pid=15338#p15338 Posted through http://www.mathematica-users.org [[postId=15338]]