From: Jim Lemon <jim_at_bitwrit.com.au>

Date: Thu, 05 Jun 2008 20:17:23 +1000

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 05 Jun 2008 - 12:18:51 GMT

Date: Thu, 05 Jun 2008 20:17:23 +1000

Albert Crosby wrote:

> I'm new to R - and trying to create a plot similiar to the spider plot at

*> http://www.statgraphics.com/eda.htm#radar .
**>
**> I can't figure out several things... most of which I would think would be
**> straightforward....
**>
**> How can I change the lines for each series plotted instead of creating a
**> filled area?
**>
**> How can I get the labels for each of the radial axes at the outside of the
**> plot instead of on a small circle in the middle?
**>
**> Is there an easy way to get a legend like the sample plot?
**>
**> Here's my attempt so far, using the USJudgeRating dataset... I'm sure that
**> there's something simple that I'm missing....
**>
**> stars(USJudgeRatings[1:2,1:9],locations = 0:1, scale=FALSE,
**> draw.segments=FALSE,
**> col.segments=1:5,col.stars=0,key.loc=0:1,
**> main="Radar/Spider Plot\nSee
**> http://www.statgraphics.com/eda.htm#radar",full=TRUE)
**>
**> What I really want to do is plot a dataset like this one:
**>
**> Year Below Basic Proficient Advanced
**> 2005 10 25 30 35
**> 2006 8 21 41 30
**> 2007 15 24 48 14
**> 2008 14 19 42 25
**>
**> and get a graphic with 4 superimposed stars of different colors superimposed
**> showing the shape of the distribution for each year. The data is
**> percentsges of students scoring in each category, summing to 100. There are
**> actually scores for Literacy and Math, so I might display 8 radii instead of
**> the 4 above. And the dataset/graph would be repeated for comparing various
**> subpopulations.
**>
**> Any pointers would be welcomed!
**>
*

Hi Albert,

Try this and it may be what you want:

# this just gets your data

radplot<-read.table("../radarplot.dat",header=TRUE)
library(plotrix)

radial.plot(radplot[,2:5],label.pos=c(0,pi/2,pi,3*pi/2),rp.type="p",
labels=c("Below","Basic","Proficient","Advanced"),main="Performance")
# let the legend extend beyond the plot

par(xpd=TRUE)

legend(-50,50,radplot[,1],col=1:4,lty=rep(1,4))
par(xpd=FALSE)

Jim

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 05 Jun 2008 - 12:18:51 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Thu 05 Jun 2008 - 14:30:37 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*