[R] Scatter plot - using colour to group points?

R. Michael Weylandt <michael.weylandt@gmail.com> michael.weylandt at gmail.com
Tue Nov 22 16:49:04 CET 2011

There's also the lines() command which takes a col argument if you want to do multiple lines (I usually wind up wrapping it in a for loop though there might be something smarter)

ggplot2 is great, though the learning curve is a little rough: you can get good help here but if you go down that path, there's also a dedicated ggplot2 list that's worth checking out. 

Glad to have you as a new useR!


On Nov 22, 2011, at 5:13 AM, SarahH <sarah.g10 at hotmail.co.uk> wrote:

> Thanks all for suggestions. 
> I now have a nice plot showing the temperature of 6 different sites, each
> site distinguished by different coloured points, using nested ifelse. My
> apologies I thought I could change the type to "l" and the same arguments
> would be applied to line graph, with 6 different lines for each site...? 
> I wanted to try lines as I think they might show the trends more clearly.  
> I have just found the plottrix package manual and will try that to achieve
> this, and look at ggplot too.
> --
> View this message in context: http://r.789695.n4.nabble.com/Scatter-plot-using-colour-to-group-points-tp4092794p4095079.html
> Sent from the R help mailing list archive at Nabble.com.
> ______________________________________________
> 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.

More information about the R-help mailing list