| To: | "Walter R. Paczkowski" <dataanalytics@earthlink.net> |
|---|---|
| Subject: | Re: Simple graph question - drawing circles |
| From: | hurley.gj@pg.com |
| Date: | Mon, 14 Feb 2005 16:49:44 -0500 |
| Cc: | "S-News" <s-news@lists.biostat.wustl.edu>, s-news-owner@lists.biostat.wustl.edu |
| Pgsenderhost: | bdc-notes041.na.pg.com [155.125.116.41] |
|
I recently wrote such a function. The trick is to figure out where to place unit circles on a grid to have the overlaps you want. There an example of plotting a unit circle in the S-Plus 6 programmers guide manual, p.302: unit.circle<-complex(argument=seq(from=-pi, to= pi, length=20)) plot(unit.circle) This only gives 20 points though. The following gives three circles that I think make a reasonable Venn diagram. Just use These three circles are in positions where I liked them circ1<-complex(argument=seq(-pi,pi,0.0005))-complex(real=0.5,imaginary=-(sqrt(3)/2)) circ2<-complex(argument=seq(-pi,pi,0.0005))+complex(real=0.5,imaginary=(sqrt(3)/2)) circ3<-complex(argument=seq(-pi,pi,0.0005))+complex(real=0,imaginary=2) points(circ1) points(circ2) points(circ3) Use text, mtext, par, etc. to do what you want with them..... -George. George J. Hurley The Procter and Gamble Company Miami Valley Innovation Center, Box 30 11810 East Miami River Road Cincinnati, OH 45252 (513) 627-0692
Hi, Does anyone know a simple function to draw three overlapping circles as in a Venn Diagram? I want to draw three circles, have all edges of the circles visible (as if I'm drawing on a chalkboard), and then be able to place labels in the 7 interior parts (the overlaps). Any suggestions are appreciated. Thanks, Walt Paczkowski ________________________ Walter R. Paczkowski, Ph.D. Data Analytics Corp. 44 Hamilton Lane Plainsboro, NJ 08536 (V) 609-936-8999 (F) 609-936-3733 -------------------------------------------------------------------- This message was distributed by s-news@lists.biostat.wustl.edu. To unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with the BODY of the message: unsubscribe s-news |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Simple graph question - drawing circles, Thom Burnett |
|---|---|
| Next by Date: | symbol on the axis label, Helen Chang |
| Previous by Thread: | Re: Simple graph question - drawing circles, Thom Burnett |
| Next by Thread: | S-Plus vs. SAS, Walter R. Paczkowski |
| Indexes: | [Date] [Thread] [Top] [All Lists] |