Re: how fill PolarPlot?
- To: mathgroup at smc.vnet.net
- Subject: [mg84442] Re: how fill PolarPlot?
- From: "David Park" <djmpark at comcast.net>
- Date: Mon, 24 Dec 2007 04:49:33 -0500 (EST)
- References: <fkla2t$3sh$1@smc.vnet.net>
Here is a solution using the Presentations package. We draw the filled right
leaf in the theta-r plane and then we transform it to the x-y plane using
DrawingTransform and combine it with the outline of the other three leafs.
Needs["Presentations`Master`"]
Module[
{rightleaf =
Draw[Cos[2 theta], {theta, -Pi/4, Pi/4}, Filling -> Axis,
FillingStyle -> Orange]},
Draw2D[
{rightleaf /. DrawingTransform[#2 Cos[#1] &, #2 Sin[#1] &],
PolarDraw[Cos[2 theta], {theta, Pi/4, 7 Pi/4}]},
Frame -> True,
ImageSize -> 300]
]
--
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/
"Murray Eisenberg" <murray at math.umass.edu> wrote in message
news:fkla2t$3sh$1 at smc.vnet.net...
>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??)
>
> --
> Murray Eisenberg murray at math.umass.edu
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower phone 413 549-1020 (H)
> University of Massachusetts 413 545-2859 (W)
> 710 North Pleasant Street fax 413 545-1801
> Amherst, MA 01003-9305
>