Hi, I'm looking for the way to make vector plot over a time line. This plot, similar to the "feather plot" in Matlab, is a line in which every thick (a time value) one vector is drawn with its length proportional to one variable (wind speed, for example) and its direction to another (wind direction, for example). Any ideas? Thanks, EKS -- ---------------------------- Eduardo Klein Instituto de Tecnolog??a y Ciencias Marinas Universidad Sim??n Bol??var Caracas, Venezuela ph/fax (58) (212) 906-3416
Eduardo Klein wrote:> Hi, > > I'm looking for the way to make vector plot over a time line. This plot, > similar to the "feather plot" in Matlab, is a line in which every thick > (a time value) one vector is drawn with its length proportional to one > variable (wind speed, for example) and its direction to another (wind > direction, for example). Any ideas? >Hi Eduardo, You may be interested in "polar.plot" or "clock24.plot" in the plotrix package. Jim
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