Re: [R] plot with diffrent colour and plotting symbols

2008-03-19 Thread John Kane
?points Does this do what you wanted? - plot(tt, var2,xaxt ="n", ylim=c(min(Var[1:3]), max(Var[1:3]))) axis(1,1:length(unique(var1)), labelname) points(tt, var3, col="green") points(tt,var4, col= "red") --

Re: [R] plot with diffrent colour and plotting symbols

2008-03-19 Thread Diego Culattoni
ego - Original Message From: Henrique Dallazuanna <[EMAIL PROTECTED]> To: Diego Culattoni <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] Sent: Wednesday, March 19, 2008 3:52:06 PM Subject: Re: [R] plot with diffrent colour and plotting symbols Perhaps: cols <- colors()[1:length(unique

Re: [R] plot with diffrent colour and plotting symbols

2008-03-19 Thread Henrique Dallazuanna
Perhaps: cols <- colors()[1:length(unique(apply(Var[3:4], 1, paste, collapse="")))*50] plot(tt, var2, type='p', col=cols, pch=16) On 19/03/2008, Diego Culattoni <[EMAIL PROTECTED]> wrote: > Dear mailing list members, > > I am a new R user, I would like to plot the follewing data > > var1 <- c(1

[R] plot with diffrent colour and plotting symbols

2008-03-19 Thread Diego Culattoni
Dear mailing list members, I am a new R user, I would like to plot the follewing data var1 <- c(1,2,1,1,2,1,2,1,2,2) var2 <- round(rgamma(10,2,1)/0.1)*0.1 var3 <- c(0,1,0,1,0,0,0,0,1,0) var4 <- c(1,2,2,2,1,1,1,1,1,1) Var <- data.frame(var1,var2,var3,var4) Var <- Var[sort(Var$var1),] tt <- Var$va