Re: [R] Plot Arrows with Angle and length

2017-04-17 Thread Greg Snow
You can also look at the my.symbols and ms.arrows functions in the TeachingDemos package. On Wed, Mar 29, 2017 at 7:44 AM, julio cesar oliveira wrote: > Dears, > > The arrows command uses the start and end coordinates of each vector, but I > have the starting coordinates,

Re: [R] Plot Arrows with Angle and length

2017-03-29 Thread Jim Lemon
Hi Julio, Perhaps "vectorField" (plotrix) is what you are looking for. Jim On Thu, Mar 30, 2017 at 12:44 AM, julio cesar oliveira wrote: > Dears, > > The arrows command uses the start and end coordinates of each vector, but I > have the starting coordinates, azimuth, and

Re: [R] Plot Arrows with Angle and length

2017-03-29 Thread William Dunlap via R-help
II find using complex numbers makes for less typing with this sort of thing. Note the use of plot(asp=1,...) to force equal scales on both axes so the angles are right. (I think asp=1 should have been the default when plotting complex numbers, but too late now.) > azimuthToNative <-

Re: [R] Plot Arrows with Angle and length - correction

2017-03-29 Thread S Ellison
Apologies; 'length' is an arrows() argument. Use something else - see below. > > x<- c(1,2,4) > > y<- c(2,3,5) > > Azimuth<- c(45,90,180) > > Length<- c(1,0.5,1) May be packages out there but if it's a quick fix you want, roll your own. arrows.az <- function(x, y, azimuth, size, ...,

Re: [R] Plot Arrows with Angle and length

2017-03-29 Thread S Ellison
> The arrows command uses the start and end coordinates of each vector, but > I have the starting coordinates, azimuth, and length. > > So, There are package that plot this arrows? > > Example: > > > x<- c(1,2,4) > > y<- c(2,3,5) > > Azimuth<- c(45,90,180) > > Length<- c(1,0.5,1) May be

Re: [R] Plot Arrows with Angle and length

2017-03-29 Thread Bert Gunter
It's just basic trig to convert. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Mar 29, 2017 at 6:44 AM, julio cesar oliveira

[R] Plot Arrows with Angle and length

2017-03-29 Thread julio cesar oliveira
Dears, The arrows command uses the start and end coordinates of each vector, but I have the starting coordinates, azimuth, and length. So, There are package that plot this arrows? Example: > x<- c(1,2,4) > y<- c(2,3,5) > Azimuth<- c(45,90,180) > Length<- c(1,0.5,1) Thanks, Julio