Skip to content
Prev 322963 / 398503 Next

color by group in ggplot

On May 3, 2013, at 1:57 PM, Ye Lin wrote:

            
You didn't say what class the ID variable was, but if it were a factor ( as is most likely), then:

plot(  as.numeric(dfrm$ID), Var1)
points( as.numeric(dfrm$ID), Var2) 

With whatever means of disiguishing overlapping points (pch, col, jittering)  might suit you.
Message-ID: <8CE083A6-4441-45DD-A893-7C4A380FED35@comcast.net>
In-Reply-To: <CAAvu=bkdpO3azVCuSUqCR8x6dVpQ2cd4XXDbTZdistwUN1qrCw@mail.gmail.com>