[R] expression(alpha) in legend()

Tord Snall tord.snall at ebc.uu.se
Wed Jan 2 16:34:43 CET 2002


Dear all,
I try to plot include expression(alpha) in a legend():

x<-  seq(0,150)
par(mfrow=c(1,1))
matplot(x, outer(x, c(0.001, 0.01, 0.05, 0.1, 0.5),
function(x, k) exp(-k*x)), type="l", lty=1:5, col=1, lwd=3, ylim=c(0,1), 
xlim=c(0,170), ylab="", xlab="Distance (m)")

legend(110, 0.8 , c(expression(alpha), "= 0.001","alpha=0.01","alpha=0.05", 
"alpha=0.1", "alpha=0.5"), lty=c(1,2,3,4,5), lwd=3, col=1,merge=T)

I want to replace the text "alpha" with the alpha symbol.

Could someone please help me with this.


Thanks in advance!

Sincerely,
Tord Snäll

-----------------------------------------------------------------------
Tord Snäll
Avd. f växtekologi, Evolutionsbiologiskt centrum, Uppsala universitet
Dept. of Plant Ecology, Evolutionary Biology Centre, Uppsala University
Villavägen 14			
SE-752 36 Uppsala, Sweden
Tel: 018-471 28 82 (int +46 18 471 28 82) (work)
Tel: 018-25 71 33 (int +46 18 25 71 33) (home)
Fax: 018-55 34 19 (int +46 18 55 34 19) (work)
E-mail: Tord.Snall at ebc.uu.se
http://www.vaxtbio.uu.se/resfold/snall.htm
------------------------------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list