Re: [R] superposing a group of x,y-plot points

From: hadley wickham <h.wickham_at_gmail.com>
Date: Sat, 19 Apr 2008 13:20:43 -0500

On Sat, Apr 19, 2008 at 1:06 PM, Tobias Verbeke <tobias.verbeke_at_telenet.be> 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_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.
Received on Sat 19 Apr 2008 - 18:24:53 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 19 Apr 2008 - 20:30:54 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive