Re: [R] line vector plots

From: Jim Lemon <bitwrit_at_ozemail.com.au>
Date: Wed 02 Nov 2005 - 08:20:22 EST


Eduardo Klein wrote:

> Hi Jim,
>
> Thanks for the tip, but I really need the same polar chart but over a
line no in a circle. I didn't find it on the plotrix package.
>

Hmmm, are you looking for something like this?

feather.plot<-function(x,y,xpos,yref=0,use.arrows=FALSE,...) {   if(missing(xpos)) xpos<-1:length(x)
  xlim<-range(x+xpos)
  ylim<-range(y)
  plot(0,xlim=xlim,ylim=ylim,type="n")
  abline(h=yref)
  if(use.arrows) arrows(xpos,yref,xpos+x,y,length=0.1,...)   else segments(xpos,yref,xpos+x,y,...)
}

where x and y are the components of the vectors and xpos is the positions on the time line? If so, I'll add that to plotrix - looks useful.

Jim



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Nov 01 21:23:17 2005

This archive was generated by hypermail 2.1.8 : Tue 01 Nov 2005 - 23:25:36 EST