Re: polarplot with arrow bearing tickmarks
- To: mathgroup at smc.vnet.net
- Subject: [mg127253] Re: polarplot with arrow bearing tickmarks
- From: "djmpark" <djmpark at comcast.net>
- Date: Wed, 11 Jul 2012 18:21:11 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <jt8vhd$k3k$1@smc.vnet.net> <12016576.18407.1341987727388.JavaMail.root@m06>
I still can't figure out what the original poster actually wants.
Nevertheless, Elkins' construction could be done more easily in
Presentations using the free standing XTickLine and a postfix rotation. You
just draw one thing after another.
<< Presentations`
Draw2D[
{(* Polar Curve *)
{Red,
PolarDraw[
1/(10*Sin[t]^4 + -1*Cos[t]^2*Sin[t]^2 + 0.1*Cos[t]^4 +
5*Cos[t]^2*Sin[t]^2), {t, 0, 2*Pi}]},
(* Tickline with Arrow *)
{XTickLine[{0, 10, 0}, {0, 10}, {0, 10, 1}, 1,
XLabTickSpecs -> {0.04, 0.`}],
Arrowheads[0.04], Arrow[{{0, 0}, {10, 0}}]} //
RotateOp[30 Degree, {0, 0}]},
Frame -> True,
PlotRange -> All
]
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/index.html
From: Alexander Elkins [mailto:alexander_elkins at hotmail.com]
(* Some clues to drawing tick marks can be had by examining the output of
InputForm[FullGraphics[graphics]] and FullAxes[graphics]. *)
(* (1) Drawback with this method is Scaled[0.958] for the Inset element
which is based on getting the commented-out Circle[{0,0},10]'s to align by
guessing at the value 0.958 *)
PolarPlot[
1/(10*Sin[t]^4 + -1*Cos[t]^2*Sin[t]^2 + 0.1*Cos[t]^4 + 5*Cos[t]^2*Sin[t]^2),
{t, 0, 2*Pi}, PlotRange -> All, PlotStyle -> {{Red, AbsoluteThickness[4]}},
Ticks -> None, Epilog -> {(*Circle[{0,0},10],*)
Inset[Graphics[{(*Circle[{0,0},10],*)Arrowheads[0.04*2],
Arrow[{{0, 0 }, {10, 0}}]}, Axes -> {True, False}, AspectRatio -> 2,
PlotRange -> {{0, 10}, {-10, 10}}], {0, 0}, {0, 0}, Scaled[0.958], {Cos[#],
Sin[#]} &[30 =B0]]}]
(* (2) Here is a roll your own tick marks method which matches closely to
the output of (1) above *)
tl = 0.05; PolarPlot[
1/(10*Sin[t]^4 + -1*Cos[t]^2*Sin[t]^2 + 0.1*Cos[t]^4 + 5*Cos[t]^2*Sin[t]^2),
{t, 0, 2*Pi}, PlotRange -> All, PlotStyle -> {{Red, AbsoluteThickness[4]}},
Ticks -> None, Epilog -> GeometricTransformation[{Arrow[{{0, 0}, {10, 0}}],
Line[{{#, 0}, {#,
Piecewise[{{4 tl, # == 0}, {3 tl, # == 1}}, 2 tl] &[Mod[#, 2]]}} & /@
FindDivisions[{0, 10}, 20]], Text[Style[#, FontFamily -> "Times"], {#,
-1/8}, {0, 1}] & /@ Range[0, 10, 2]}, RotationTransform[30 =B0]]]
Hope this helps...
"van zano" <L.Balzano at gmail.com> wrote in message
news:jt8vhd$k3k$1 at smc.vnet.net...
> dear all,
> I would like to decorate this polarplot with an arrow that starts at
> the
origin and moves outwards at a certain angle (phi). it would be great if the
arrow could also have tickmarks.
> does anyone have a solution?
>
> PolarPlot[
> 1/(10*Sin[t]^4 + -1*Cos[t]^2*Sin[t]^2 + 0.1*Cos[t]^4 +
> 5*Cos[t]^2*Sin[t]^2), {t, 0, 2*Pi},
> PlotRange -> All,
> PlotStyle -> {{Red, AbsoluteThickness[4]}}]
>
> thanks! L
>