Skip to content
Prev 138865 / 398506 Next

LaTeX in R

Thank you, uwe and jeremy. I was actually looking exactly for that! But
something still doesn't work:
I want to plot a symbol in a legend of a plot, lets say "\sigma = 2". 2
should be the value of a variable. So, when I try 

mySigma=2;plot(1:10,dnorm(1:10,sd=mySigma),type='l')
legend(x="topright",legend=paste(expression(sigma)," = ",mySigma),lty=1)

, the sigma is not plotted as a symbol. This version: 

mySigma=2;plot(1:10,dnorm(1:10,sd=mySigma),type='l')
legend(x="topright",legend=expression(paste(sigma," = ",mySigma)),lty=1)

gives me a 'real' sigma but the mySigma variable is not evaluated. Any
ideas?
Mario.
 
__________________________________________________________________

Mario Maiworm
Biological Psychology and Neuropsychology
University of Hamburg
Von-Melle-Park 11
D-20146 Hamburg

Tel.: +49 40 42838 3515
Fax.: +49 40 42838 6591

http://bpn.uni-hamburg.de/Maiworm_e.html
http://cinacs.org
__________________________________________________________________