Re: polarplot with arrow bearing tickmarks
- To: mathgroup at smc.vnet.net
- Subject: [mg127248] Re: polarplot with arrow bearing tickmarks
- From: "Alexander Elkins" <alexander_elkins at hotmail.com>
- Date: Wed, 11 Jul 2012 02:19:43 -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>
(* 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 °]]}]
(* (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 °]]]
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
>