MathGroup Archive 2007

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

Search the Archive

Re: how fill PolarPlot?

  • To: mathgroup at
  • Subject: [mg84434] Re: how fill PolarPlot?
  • From: Bill Rowe <readnewsciv at>
  • Date: Mon, 24 Dec 2007 04:45:16 -0500 (EST)

On 12/23/07 at 4:34 AM, murray at (Murray Eisenberg)

>I Mathematica 6 I have a PolarPlot, e.g., a 4-leaved rose:

>PolarPlot[Cos[2 theta], {theta, 0, 2 Pi}]

>How can I fill the inside -- or, what I really want, just the leaf
>in the right half-plane -- with some color?

>I note that Filling does not seem to be an option for PolarPlot (or
>for what would be almost as good, ParametricPlot).

>I tried including the following (obtained by converting from :

>Prolog->RegionPlot[(x^2 + y^2)^(3/2) <= x^2-y^2,
>{x,-0.02,1},{y,-1,1}, Frame->False, AspectRatio->Automatic]

>However, that led to a mysterious error message:

>$Aborted is not a Graphics primitive or directive.

>(Perhaps because of an incompatibility of a Prolog with cartesian
>coordinates inside a polar coordinate plot??)

I don't know what causes the error message but I do not believe
it is the issue of cartesian coordinates versus polar
coordinates since the following works with no error messages

PolarPlot[Cos[2 theta], {theta, 0, 2 Pi}, AspectRatio -> Automatic,
  Prolog ->
   Inset[RegionPlot[(x^2 + y^2)^(3/2) <= x^2 - y^2, {x, -0.02,
1}, {y, -1, 1},
     Frame -> False, AspectRatio -> Automatic], {0, 0}, {0, 0}, 1.06]]

  The only aspect of the the code above I do not understand is
the necessity of setting the last size argument to Inset to
1.06. I would have expected this to be 1. But that results in a
plot where the right leaf is not completely colored in.
To reply via email subtract one hundred and four

  • Prev by Date: Re: how fill PolarPlot?
  • Next by Date: Re: sum over i+j+k==n
  • Previous by thread: Re: how fill PolarPlot?
  • Next by thread: Re: how fill PolarPlot?