MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Automating PolarPlot with Polar Gridlines

For those who have DrawGraphics the following will produce a labeled polar
grid. It uses DrawLineLabels to label the lines produced by the PolarMap. It
is not quite automatic because we have to extract and separate the Lines
from the PolarMap primitives. The first set of Lines are the circular arcs
and the second set are the radial lines. In the following I extended the
angle range to cover the entire curve.


    {Red, DrawPolarR[6 Sin[x + Pi/2]^2 - 2x, {x, -Pi/2, Pi/2}],
      maplines = DrawPolarMap[Identity, {0, 7}, {-2, Pi/2}],
      Take[maplines, {3, 15, 2}] //
        DrawLineLabels[Sqrt[#1^2 + #2^2] &, 0.5 &, DrawLLFormat -> Round,
          DrawLLTextOptions -> {Background -> White}],
      Take[maplines, {16, 30}] //
        DrawLineLabels[ArcTan[#1, #2]/Degree &, 1.0 &,
          DrawLLFormat -> (Round[#]Degree &),
          DrawLLTextOptions -> {Background -> White}]},
    AspectRatio -> Automatic,
    PlotRange -> All,
    ImageSize -> 500];

David Park
djmp at

From: ggroup at [mailto:ggroup at]
To: mathgroup at

I meant to paste in an example of a manual polar plot, which has most of
I want except for the gridline labels:

  PolarPlot[6 Sin[x + Pi/2]^2 - 2x, {x, -Pi/2, Pi/2}, PlotStyle -> {Red}],
  PolarMap[Identity, {0, 7}, {-Pi/2, Pi/2}, PlotStyle -> {GrayLevel[0.5]}],
  PlotRange -> {{0, 6.25}, {-3.50, 2.00}}, AspectRatio -> Automatic]

On Thu, 11 May 2006 13:15:41 -0700, ggroup at wrote
> Hi,
> I was wondering if anyone had a good scheme to produce polar plots with
> polar gridlines.  Right now, I can add the gridlines using PolarMap in
> the Graphics`Graphics package.  However, these gridlines are not
> labelled and choosing the range of the gridlines has to be entered
> manually.
> I know it is possible, though not quite trivial, to calculate the
> PlotRange, polar grid lines and tick marks in my own plotting function,
> but I was wondering if there is is a standard package or function that
> I can use instead.
> Thanks!

  • Prev by Date: Re: Save to Quicktime during calculations?
  • Next by Date: Re: Mathematica Question
  • Previous by thread: Re: Automating PolarPlot with Polar Gridlines
  • Next by thread: Limit Question