Hi Jim, This is clearly the function I need to use. However, I am new to Rplot and coding. I know that my output image is not what the data indicate. My input file is a matrix, where the first row is the residue number (10 values), and the second row is the hydrophathy values (10 corresponding values ranging from 0.3-0.9).
At this point, the discontinous shading would be a polishing step, and I would be just content with the color scale corresponding to the range of hydropahty values. Thanks. -Ray On Mon, Jan 19, 2009 at 8:55 AM, Ahmed, Rayhan <raah...@utmb.edu> wrote: > > > ________________________________________ > From: Jim Lemon [...@bitwrit.com.au] > Sent: Saturday, January 17, 2009 5:58 PM > To: Ahmed, Rayhan > Cc: r-help@r-project.org > Subject: Re: [R] plot data with a colour scale - more details! > > 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 ______________________________________________ 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.