MathGroup Archive 2001

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

Search the Archive

Re: Drawing a Washer, Polar Plot Question

  • To: mathgroup at
  • Subject: [mg29736] Re: [mg29728] Drawing a Washer, Polar Plot Question
  • From: BobHanlon at
  • Date: Thu, 5 Jul 2001 06:08:01 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

In a message dated 2001/7/4 6:56:32 PM, rlove at writes:

>I have a polar plot of my data that lookes the way I want.  Now
>I want to add a grey "washer" shaped exclusion zone on top of 
>the plot.  I see there is a nice Disk two dimensional graphics
>object that is almost what I want.  It draws a filled in circle 
>centered on {x,y} of radius r.  What I want is some thing that
>draws a filled in circle between r1 and r2, centered on {x,y}.
>Is there some way I can do this easily?  I've tried combining two
>Disks of different colors and sizes but no luck.

One approach:


doughnut[{x0_, y0_}, r1_?Positive, r2_?Positive, opts___?OptionQ] := 
    Module[{x, y, rminSq = Min[r1, r2]^2, rmax = Max[r1, r2], rmaxSq}, 
      rmaxSq = rmax^2; 
        {x,x0-rmax,x0+rmax}, {y,y0-rmax,y0+rmax} ]];

    PolarPlot[{4/(2+Cos[t]),4 Cos[t]-2},
      {t,0,2 Pi}, 
      PlotStyle -> Red], 
    doughnut[{-1, -1}, 2, 3]];

Bob Hanlon
Chantilly, VA  USA

  • Prev by Date: RE: How to plot the inverse trig functions
  • Next by Date: Re: Should Pure Functions Require &
  • Previous by thread: Drawing a Washer, Polar Plot Question
  • Next by thread: RE: Drawing a Washer, Polar Plot Question