Hi Marcio,

Try this:

x <- rnorm(5)
y <- rnorm(5)
ind <- c(1,0,0,1,0)
plot(x, y, col = ind + 1, pch = 16)  # 1 is black, 2 is red

Take a look at the col argument under ?par. Also, ?plot might be of interest
in this case.

HTH,
Jorge


On Wed, Aug 11, 2010 at 7:41 PM, Mestat <> wrote:

>
> Hey folks,
> I have a graphic of dispersion...
> I would like to color some specific points (x,y) according to another
> indicator variable, for example:
>
> x<-rnorm(5)
> y<-rnorm(5)
> ind<-(1,0,0,1,0)
> plot(x,y)
>
> Any suggestion, thanks...
> Marcio
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Graphic-Dispersion-Colored-Points-tp2322011p2322011.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>

	[[alternative HTML version deleted]]

