Anne: Perhaps this example will help.
I have data (several dozen observations at each condition) for different R=stress.ratio. The stress.ratios are: > stress.ratio [1] 0.1 0.1 0.1 0.2 0.3 0.5 0.6 0.7 0.8 0.9 0.9 0.9 0.9 0.9 0.9 You will notice multiple datasets for R=0.1 and R=0.9. I assigned colors to each stress.ratio, such that R.color [1] "black" "black" "black" "red" "orange" "gray" "green" "light blue" "blue" "dark blue" [11] "dark blue" "dark blue" "dark blue" "dark blue" "dark blue" Then I plotted the legend on my plot this way: legend(x.coordinate, y.coordinate, unique(stress.ratio), col=unique(R.color), pch=15, cex=0.8) Best wishes. Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 503-217-5849 http://www.StatisticalEngineering.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anne Sent: Thursday, July 15, 2004 12:42 PM To: [EMAIL PROTECTED]; Berton Gunter Subject: Re: [R] color scale to label a plot yes.. legend sould help. I still do not know how to paint my color sacle and put the corresp. labels correctly Thanks Anne ----- Original Message ----- From: "Berton Gunter" <[EMAIL PROTECTED]> To: "Anne" <[EMAIL PROTECTED]> Sent: Thursday, July 15, 2004 5:55 PM Subject: Re: [R] color scale to label a plot > Do you mean ?legend ?? > > On lattice plots, the key= argument controls legends. ?xyplot gives details. > > > > -- > > Bert Gunter > > Non-Clinical Biostatistics > Genentech > MS: 240B > Phone: 650-467-7374 > > > "The business of the statistician is to catalyze the scientific learning process." > > -- George E.P. Box > > ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
