Re: [R] LaTeX in R

From: Thomas Lumley <>
Date: Sat 31 Jul 2004 - 01:42:28 EST

On Fri, 30 Jul 2004, Roy, Supratik wrote:

> I tried to include LaTeX expressions in the header of a plot in R.
> (1) Using PlotMath, LaTeX type expressions, e.g., R^x is possible, however,
> dist<-"...." (some string)
> ....main=expression(R^x,dist)....
> does not substitute the value of dist, as well do the proper superscripting.
> Also within an expression, substitute does not work, (apparently), so that
> explicit substituting of "dist" does not take place.

Working from the example in FAQ 7.15 suggests something like  dist=" is the xth power of R"

which works fine. A slightly more compact version is   plot(rnorm(10),main=bquote(R^x*.(dist)))

If that output isn't what you want you will need to explain what you want more precisely.

        -thomas mailing list PLEASE do read the posting guide! Received on Sat Jul 31 02:03:03 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:55:22 EST