[R] plotmath question

baptiste auguie baptiste.auguie at googlemail.com
Thu Aug 19 20:08:10 CEST 2010


Try this,

b = 20

plot(1, ylab= bquote(italic(P) * .(b))  )

HTH,

baptiste

On 19 August 2010 20:02, array chip <arrayprofile at yahoo.com> wrote:
> Hi all, let me give a simple example:
>
> b<-20
> I would like to print ylab as "P20" where "P" is printed in Italic font. When I
> do the following:
>
> plot(1, ylab=expression(paste(italic("P"),b,sep="")))
>
> I got y axis label printed as "Pb" instead of "P20". What is the best solution
> to print platmath symbols with value of the variable at the same time?
>
> Thanks
>
> John
>
> ______________________________________________
> 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.
>



-- 
____________________

Dr. Baptiste Auguié

Departamento de Química Física,
Universidade de Vigo,
Campus Universitario, 36310, Vigo, Spain

tel: +34 9868 18617
http://webs.uvigo.es/coloides



More information about the R-help mailing list