[R] mathematical expressions in axes labels

Anne York york at noaa.gov
Thu Aug 2 18:20:38 CEST 2001


Here are two expressions that am using as axes labels:


deln15.lab <- expression(delta^15*N)
delc13.lab <- expression(delta^13*C)


#I was pleasantly surprised that the axes labels on the
#following 2 plots were the same. 

par(mfrow=c(2,2))
plot(1:10,1:10,xlab=deln15.lab, ylab=delc13.lab)
matplot(1:10,1:10,xlab=deln15.lab, ylab=delc13.lab)

#The only difference in the plots (that I noticed) 
#was that matplot did not use
#the default plotting characters specified
#in my .First function.
#
#plot also appears to be able to use expressions in the title:

plot(1:10,1:10,xlab=deln15.lab, ylab=delc13.lab, main =
	expression(alpha~~beta~~gamma~~delta))

#THis may be machine dependent -- this was run on R1.3.0 on Windows NT 4
#SP6.




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Anne E. York
National Marine Mammal Laboratory
Seattle WA 98115-0070  USA
e-mail: anne.york at noaa.gov
Voice: +1 206-526-4039
Fax: +1 206-526-6615
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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