Hughes, Ed
2010-Sep-15 03:29 UTC
[R] Using feather.plot to try and generate a stick plot of current velocity data (and having issues)
Hello All, I am attempting to use the feather.plot function from the plotrix package to graph current velocity data as I have speed and direction. I let "r" be the first 10 rows of current speed data and "theta" be the first 10 rows of directional data in radians. I had tried this with 10 measurements, but keep getting the following error message:> feather.plot(r,theta,1:10,yref=0,use.arrows=FALSE, fp.type="m")Error in segments(xpos, yref, xpos + x, y, ...) : invalid third argument My goal was to trouble shoot this smaller data set and see if I could ramp up to few thousand entries to basically generate a stick plot of current flow data. Curious if I was doing anything obviously wrong with my arguments or if I should be using an entirely different function. Thanks for any guidance Eddie Hughes [[alternative HTML version deleted]]
Jim Lemon
2010-Sep-15 09:17 UTC
[R] Using feather.plot to try and generate a stick plot of current velocity data (and having issues)
On 09/15/2010 01:29 PM, Hughes, Ed wrote:> Hello All, > > > > I am attempting to use the feather.plot function from the plotrix > package to graph current velocity data as I have speed and direction. I > let "r" be the first 10 rows of current speed data and "theta" be the > first 10 rows of directional data in radians. I had tried this with 10 > measurements, but keep getting the following error message: > > > > > >> feather.plot(r,theta,1:10,yref=0,use.arrows=FALSE, fp.type="m") > > > > Error in segments(xpos, yref, xpos + x, y, ...) : invalid third argument > > > > My goal was to trouble shoot this smaller data set and see if I could > ramp up to few thousand entries to basically generate a stick plot of > current flow data. Curious if I was doing anything obviously wrong with > my arguments or if I should be using an entirely different function. >Hi Eddie, I think the problem is with the format of your data. I tried a whole bunch of variants of vectors, matrices and data frames and couldn't reproduce your error. Could you post a sample data set that causes this problem? Thanks. Jim
Jim Lemon
2010-Sep-16 08:48 UTC
[R] Using feather.plot to try and generate a stick plot of current velocity data (and having issues)
Hi all, After a bit of offlist correspondence, the problem with feather.plot was found to be with the input data format (lists) and the particular data revealed a bug in the function. A fix for the bug and a warning about lists as input will be in the next version of plotrix (3.0-1). Jim