[R] Scatter Plot - 3 vectors side by side

Chuck Cleland ccleland at optonline.net
Tue May 6 18:03:57 CEST 2008


On 5/6/2008 11:46 AM, A Ezhil wrote:
> Hi,
> 
> I have 3 vectors, 
> x=rnorm(10); y=rnorm(20); z=rnorm(30). 
> 
> I would like to plot 3 vectors side by side (like a
> bar plot) with scatter plot something similar to the
> following: 
> 
> ..   ***  ;;;
> ..   **   ;;;
> ..   ***  ;;;
> ..   ***  ;;;
> ...  ***  ;;
> x     y   z
> 
> How can I do this with Plot()? 

   How about something like this:

stripchart(c(x,y,z) ~ rep(c("x","y","z"), c(10,20,30)),
            vertical=TRUE, ylab="")

> Thanks in advance.
> Best regards,
> Ezhil
> 
> 
> 
> 
> 
>       ____________________________________________________________________________________
> 
> [[elided Yahoo spam]]
> 
> ______________________________________________
> 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. 

-- 
Chuck Cleland, Ph.D.
NDRI, Inc. (www.ndri.org)
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894



More information about the R-help mailing list