On Sat, Apr 19, 2008 at 1:06 PM, Tobias Verbeke
<[EMAIL PROTECTED]> wrote:
> Anna-Maria Tyrisevä wrote:
>
>  > please, could somebody tell me how can I superpose a group of x,y-plot
>  > points (using different symbols) that belong to a certain class of factor 
> z?
>  > Can't find a solution despite of hours of reading.
>
>  x <- rnorm(30)
>  y <- rnorm(30)
>  f <- factor(sample(LETTERS[1:5], 30, replace = TRUE))

Or with legends as well:

install.packages("ggplot2")
library(ggplot2)

qplot(x, y, colour = f)
qplot(x, y, shape = f)

Hadley

-- 
http://had.co.nz/

______________________________________________
R-help@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.

Reply via email to