On 10/28/2010 07:14 AM, Gonzalo Garcia-Perate wrote:
I am creating radial plots to visualise popularity of a series of
topics, I was wondering if someone has come across a radial plot in
which the lines originate from the edge of the plot instead of the
centre, does anyone know how can this be achieved in R? Are there any
good reasons not to do it?

Hi Gonzalo,
This is an interesting suggestion. I suppose it could be done with an "invert" routine that swapped the center coordinates for those of the outer ring of the annular grid for each radial line. I think I have seen something like this to illustrate some sort of genetic information.

Yep, down about line 139 in my code you could define xposmax and yposmax if the new argument "invert" was TRUE, then

if(invert) {
 xposmax<-cos(radial.pos[i,])*maxlength
 yposmax<-sin(radial.pos[i,])*maxlength
}
if(match("r",rptype,0)) {
 if(invert)
  segments(xposmax,yposmax,xpos,ypos,
   col=linecol,lty=ltype,lwd=lwidth,...)
 else
  segments(0,0,xpos,ypos,col=linecol,
   lty=ltype,lwd=lwidth,...)

Untested, but it might do what you want.

Jim

______________________________________________
R-help@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.

Reply via email to