Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Re: Automating PolarPlot with Polar Gridlines

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66451] Re: [mg66428] Re: Automating PolarPlot with Polar Gridlines
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sat, 13 May 2006 02:42:42 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

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.

Needs["DrawGraphics`DrawingMaster`"]

Draw2D[
    {Red, DrawPolarR[6 Sin[x + Pi/2]^2 - 2x, {x, -Pi/2, Pi/2}],
      Gray,
      maplines = DrawPolarMap[Identity, {0, 7}, {-2, Pi/2}],
      Black,
      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 earthlink.net
http://home.earthlink.net/~djmp/


From: ggroup at sarj.ca [mailto:ggroup at sarj.ca]
To: mathgroup at smc.vnet.net


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

Needs["Graphics`"];
DisplayTogether[
  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 sarj.ca 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