[R] Changing origin of line in radial plot

Jim Lemon jim at bitwrit.com.au
Fri Oct 29 10:53:41 CEST 2010


On 10/28/2010 10:38 PM, Gonzalo Garcia-Perate wrote:
> Jim, thanks for your reply, it works! but the results are not what I
> expected. What the code does now is completely reverse the central
> chart area, so what was coloured before now is white, see here
> http://www.flickr.com/photos/gonzillaaa/
>
Okay, I've got a better idea of what you want, I think. As though the 
normal lines were pushed out radially until they hit the outer grid line.

> What I was hoping for, was having the same length lines (very short
> ones and very long ones) but stemming from the edge of the plot. Any
> suggestions?
>
Try this with the attached function:

library(plotrix)
testlen<-rnorm(10)*2+5
testpos<-seq(0,18*pi/10,length=10)
testlab<-letters[1:10]
radial.plot(testlen,testpos,main="Test Radial Lines",
  line.col="red",lwd=3)
source("radial.plot.R")
radial.plot(testlen,testpos,main="Test Radial Lines",
  line.col="red",lwd=3,outward=FALSE)

Jim
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: radial.plot.R
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101029/bae7fce9/attachment.pl>


More information about the R-help mailing list