[R] plotmath

baptiste auguie baptiste.auguie at googlemail.com
Mon Sep 21 16:47:07 CEST 2009


plot(0, xlab=bquote(theta *" = "* .(x)))

?substitute
?bquote

HTH,

baptiste

2009/9/21 Jarrod Hadfield <j.hadfield at ed.ac.uk>:
> Hi,
>
> I want to have a legend that is a mixture of numbers and symbols, and have
> found no way of achieving this.
>
> For example, if I want theta="x" or theta=2 this is easily achieved.
>
> plot(0, xlab=expression(paste(theta, "= x")))
> plot(0, xlab=expression(paste(theta, "= 2")))
>
> However, if x is some numeric variable and I want to plot theta=x, how is
> this done?
>
> Thanks for any help,
>
> Jarrod
>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
> ______________________________________________
> 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.
>




More information about the R-help mailing list