[R] mathematical expressions in axes labels

Anne York anne.york at noaa.gov
Fri Aug 3 01:32:27 CEST 2001


I'm sorry, I mistakenly sent my message before I finished it. 

I was confused about the differences between plotmath() and plot() and
why plotmath was a separate function. It seems that the purpose of the
plotmath documentation is to tell us how to place mathematical
expressions on graphics.  Much of that documentation discusses the use
of expression() which is the guts of the process and furthermore, that
many of those tasks can be done with the ordinary plot function (as is
documented under plotmath).  I suggest that in the plotmath
documentation that there be a link to "expression".



Uwe Ligges wrote:
> 
> Anne York wrote:
> >
> > 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.
> 
> So your problem has nothing to do with the subject?
> 
> The behaviour of plotting symbols in matplot() is documented in the
> help:
> 
> pch: character string or vector of 1-characters or integers for plotting
> characters, see points. The first character is the plotting-character
> for the first plot, the second for the second, etc. The default is the
> digits (1 through 9, 0) then the letters.
> 
> So, what is your problem ???
> 
> Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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