[R] Colour points in plot according to third variable

2010-07-29 Thread Anna Berthinussen
Hi, I am using the plot function to make a simple plot of my data with one variable against another and want to colour the data points according to a third variable. The third variable is continuous (Time) and I want to try two different ways of colouring the data points, either: Divide

Re: [R] Colour points in plot according to third variable

2010-07-29 Thread Henrique Dallazuanna
Try this: library(RColorBrewer) plot(iris$Sepal.Length, col = as.character(cut(iris$Sepal.Length, c(4,6,7,8), labels = brewer.pal(3, 'Blues' On Thu, Jul 29, 2010 at 2:51 PM, Anna Berthinussen bs0...@leeds.ac.ukwrote: Hi, I am using the plot function to make a simple plot of my

Re: [R] Colour points in plot according to third variable

2010-07-29 Thread Jannis
check out the Plotrix package and the color.scale() or similar functions. Henrique Dallazuanna schrieb: Try this: library(RColorBrewer) plot(iris$Sepal.Length, col = as.character(cut(iris$Sepal.Length, c(4,6,7,8), labels = brewer.pal(3, 'Blues' On Thu, Jul 29, 2010 at 2:51 PM, Anna