[R] plot data with a colour scale - more details!
Jim Lemon
jim at bitwrit.com.au
Sun Jan 18 00:58:40 CET 2009
Ahmed, Rayhan wrote:
> Hello again,
>
> I am trying to create a color scale plotting the hydroathy index (y-axis) versus residue (x-axis) - each residue (1-100) has a value between 0-1. I've been trying to create a scale where:
> 0-0.499: increasing intensity of red
> 0.5- yellow
> 0.51 - 1 increasing intensity of green.
>
> THis is in lieu of a line graph.
>
> I'm not sure which type of plot to begin with - I attempted to modify a heat plot, but it did not work.
>
>
Hi Rayhan,
I think that color2Dmatplot might do what you want. Check the last
example that calls color.scale twice to see how to get discontinuous
ranges of color for the values.
Jim
More information about the R-help
mailing list