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 time it into three groups and then colour each data point accordingly eg. 30-60 minutes in green, 60-90 minutes in red and 90-120 minutes in blue..

or,

Colour the data points using a colour gradient eg. with increasing colour intensity as time increases..

I think I need to be able to do it within the plot() function as I have lines fitted from a model which I will also add to the graph.

Any suggestions would be greatly appreciated??

Thanks in advance

Anna

______________________________________________
R-help@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.

Reply via email to