Re: [R] Plotting an Underbrace in R

From: Michael McAssey <mpmcassey_at_gmail.com>
Date: Fri, 15 Apr 2011 10:03:17 +0200

Ben,

This example of pgfSweave looks like it would address my problem.  I installed this package, but I cannot determine how to use it to make R convert LaTeX commands into mathematical symbols on an R plot.  The documentation does not seem to address this.  I tried to mimic the example from Yihui Xie that you provided but R only puts the LaTeX code on my plot without converting it.  That is, if in the R GUI I have:

> library(pgfSweave)
> plot(1:10, 1:10, "$Y=\\beta_0 + \\beta_1 x + \\epsilon$")

then in the plot the y-axis label is $Y=\beta_0 + \beta_1 x + \epsilon$ rather than what I want. I can't find any useful help on Google. Any further suggestions?

Thanks.

Michael

On Thu, Apr 14, 2011 at 11:22 PM, Ben Bolker <bbolker_at_gmail.com> wrote:
>
> Michael McAssey <mpmcassey <at> gmail.com> writes:
>
> >
> > I need to include some mathematical expressions in a plot I am creating in
> > R, one of which requires an underbrace, which in LaTeX would be written like
> >
> > \underbrace{T \cdots T}_{n times}
> >
> > There does not appear to be a provision for this in plotmath, and I cannot
> > find anything on the topic in the R-help archive or in a Google search.  I
> > would appreciate some help with this.
>
>  Does
>
> <http://yihui.name/en/wp-content/uploads/2010/02/lyx-pgfsweave-demo.pdf>
>
>  help at all?
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

--
Michael P. McAssey, Ph.D.
Statistics for Life Sciences, Department of Mathematics
Faculty of Sciences, Vrije Universiteit Amsterdam
De Boelelaan 1081a, 1081 HV Amsterdam, The Netherlands
Office: S-230, W&N building
Tel: +31 (0)20 598 7724
Fax: +31 (0)20 598 7653
Mobile: +31 (0)62 113 8600
http://www.few.vu.nl/~mmy700/

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 15 Apr 2011 - 08:21:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 15 Apr 2011 - 09:40:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive