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

2011-11-21 Thread SarahH
Dear All, I am very new to R - trying to teach myself it for some MSc coursework. I am plotting temperature data for two different sites over the same time period which I have downloaded from a university weather station data archive. I am using the following code to create the plot plot ( x

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

2011-11-21 Thread SarahH
look something like this: > > X = letters[c(1,2,3,3,1,2,1,3,3,1,2,2,1)] > > colX = c("red","green","blue")[as.factor(X)] > > Hope this helps, > Michael > > On Mon, Nov 21, 2011 at 2:17 PM, SarahH <sarah.g10@.co> wrote: >> D

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

2011-11-22 Thread SarahH
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

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

2011-11-22 Thread SarahH
Success with the lines command and col argument! I have some nice point and line plots. Thanks so much for you help. Ongoing project - I will probably be back! Sarah -- View this message in context: http://r.789695.n4.nabble.com/Scatter-plot-using-colour-to-group-points-tp4092794p4097625.html S