Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: polarplot with arrow bearing tickmarks
Replies: 3   Last Post: Jul 11, 2012 6:21 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alexander Elkins

Posts: 32
Registered: 4/13/09
Re: polarplot with arrow bearing tickmarks
Posted: Jul 11, 2012 2:22 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

(* 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@gmail.com> wrote in message
news:jt8vhd$k3k$1@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
>







Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.