[R] Help with plotting a line that is multicoloured based on levels of a factor

Pam Allen allen_pam at hotmail.com
Mon Mar 28 18:33:26 CEST 2011

Thank you Jim and David for your help.  

The 'levels' call is not a misdirection, in my actual dataset it is
necessary because the flows aren't symmetrical.   So while your solution is
quite elegant David, it doesn't apply to my actual data, just the example. 
Too bad, it's quite nice!

I do think that "color.scale.lines" can work, now I just need to figure out
how!  Unfortunately when I tried your example Jim:

data=cbind.data.frame(date, flow, levels)

I got this error:
"Error in length(redrange) : 'redrange' is missing"

But I do think the function is the way to go for my dataset.

Thank you!


View this message in context: http://r.789695.n4.nabble.com/Help-with-plotting-a-line-that-is-multicoloured-based-on-levels-of-a-factor-tp3385857p3412310.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list