Skip to content

Plotting colour-coded points

4 messages · ANJAN PURKAYASTHA, Jorge Ivan Velez, David Winsemius +1 more

#
On Jan 5, 2011, at 2:00 PM, ANJAN PURKAYASTHA wrote:

            
Something along the lines of this code:

plot(a ~ id, data=dfrm,
         col=c("red", "green", "blue")[findInterval(dfrm$b,  
c(0,10,20,30) )] )
#
With xx as your data.frame
 library(ggplot2)
 qplot(a, id, data=xx, color=b)
--- On Wed, 1/5/11, ANJAN PURKAYASTHA <anjan.purkayastha at gmail.com> wrote: