Look at the my.symbols function in the TeachingDemos package. You can get line
segments using the ms.arrows function and setting the length argument to 0 (or
you can make your own plotting function by copying ms.arrows and replacing the
call to arrows with a call to segments).
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Tom_R
> Sent: Friday, April 02, 2010 10:13 AM
> To: r-help at r-project.org
> Subject: [R] angles
>
>
> Hi R users,
>
> I would like to construct a sort hybrid vector/scatter plot.
>
> My data is in the following format: 3-column x,y,z data-frame in which
> every row is a separate data-point.
> The x & y columns are coordinates, and the z column contains
> orientation
> data (range 0-180 degrees, with East=0 & North=90).
>
> I need to set each x,y, point to have the alignment in z. Hence my
> 'vectors'
> would simply be lines with the mid-point at x,y and without arrow-
> heads.
>
> R's normal vector plot requires a pair of x,y coords for the start
&
> end of
> each vector, whereas I just have an orientation.
>
> Any ideas?
>
> Cheers!
> Tom
>
> --
> View this message in context: http://n4.nabble.com/angles-
> tp1749321p1749321.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.