Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

Re: how fill PolarPlot?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84443] Re: how fill PolarPlot?
  • From: dflatin at rcn.com
  • Date: Mon, 24 Dec 2007 04:50:05 -0500 (EST)
  • References: <fkla2t$3sh$1@smc.vnet.net>

How about

Module[{leaf, clover},
 leaf = FullGraphics@
   RegionPlot[(x^2 + y^2)^(3/2) <= x^2 - y^2, {x, -0.02, 1}, {y, -1,
     1}, Frame -> False, AspectRatio -> Automatic];
 clover = PolarPlot[Cos[2 theta], {theta, 0, 2 Pi}];
 Show[{leaf, clover}]
 ]

Or you could use

Module[{leaf, clover},
 leaf = RegionPlot[(x^2 + y^2)^(3/2) <= x^2 - y^2, {x, -0.02,
    1}, {y, -1, 1}, Frame -> False, AspectRatio -> Automatic];
 clover = PolarPlot[Cos[2 theta], {theta, 0, 2 Pi}];
 Show[{leaf, clover}, PlotRange -> All]
 ]

But for some reason on my machine the second plot is not anti-aliased.
I am not really clear on when and where Mathematica uses anti-
aliasing, but I wish it was more consistent.

When using Prolog I didn't get the same error message as you did.
Instead the error was:

"Graphics is not a Graphics primitive or directive"

 I am using Mathematica 6.0.1 on Mac OS X 10.4.10

Dan

On Dec 23, 4:34=A0am, Murray Eisenberg <mur... at math.umass.edu> wrote:
> I Mathematica 6 I have a PolarPlot, e.g., a 4-leaved rose:
>
> =A0 =A0PolarPlot[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 :
>
> =A0 =A0Prolog->RegionPlot[(x^2 + y^2)^(3/2) <= x^2-y^2, {x,-0.02,1},{y,-=
1,1},
> =A0 =A0 =A0 =A0Frame->False, AspectRatio->Automatic]
>
> However, that led to a mysterious error message:
>
> =A0 =A0$Aborted is not a Graphics primitive or directive.
>
> (Perhaps because of an incompatibility of a Prolog with cartesian
> coordinates inside a polar coordinate plot??)
>
> --
> Murray Eisenberg =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mur... at math.umass=
.edu
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower =A0 =A0 =A0phone 413 549-1020 (H)
> University of Massachusetts =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0413 545-2859 (W=
)
> 710 North Pleasant Street =A0 =A0 =A0 =A0 =A0 =A0fax =A0 413 545-1801
> Amherst, MA 01003-9305



  • 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?