Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10876

Re: polarplot with arrow bearing tickmarks

From "Alexander Elkins" <alexander_elkins@hotmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: polarplot with arrow bearing tickmarks
Date 2012-07-11 06:22 +0000
Message-ID <jtj62c$5oh$1@smc.vnet.net> (permalink)
References <jt8vhd$k3k$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


(* 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
>


Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

polarplot with arrow bearing tickmarks van zano <L.Balzano@gmail.com> - 2012-07-07 09:29 +0000
  Re: polarplot with arrow bearing tickmarks "Alexander Elkins" <alexander_elkins@hotmail.com> - 2012-07-11 06:22 +0000
  Re: polarplot with arrow bearing tickmarks "djmpark" <djmpark@comcast.net> - 2012-07-11 22:21 +0000

csiph-web