[R] Use of colour in plots

Steve Murray smurray444 at hotmail.com
Thu Sep 18 16:13:33 CEST 2008


Jim and all,

Maybe I've misunderstood ?color.scale (appologies if this is so), but I don't think this is what I need. I'm not looking to scale the colours of points, instead I simply want to assign each point a colour (either red or green) based on it's value in the Urban.Rural column.

To clarify (but please also see my earlier message if this helps):

In my dataset (Jan) I have 3 columns of interest: Average Burnt Area Fraction (ABAF), PopDensity and Urban.Rural.

I want to plot ABAF against PopDens (which I've had no problems doing) and then, regardless of the values of ABAF and PopDens, I want to assign it a colour. The colour each point is given is based on the corresponding Urban.Rural value on each row. If for each pair of ABAF and PopDens values the Urban.Rural value on that row is>1.25, then the point should be coloured red, whereas if it's =



More information about the R-help mailing list