[R] greek symbols on ylab=

Henrique Dallazuanna wwwhsd at gmail.com
Thu Mar 18 19:13:41 CET 2010


Try this:

par(mar = c(5.1, 6, 4, 2))
plot(1, ylab = '')
mtext(expression(PM[2.5] ~ Concentration ~(mu*g/m^3)), side = 2, line = 4)
mtext("(random text in brackets)", side = 2, line = 3, cex = 0.8)

On Thu, Mar 18, 2010 at 3:02 PM, Peng Cai <pengcaimaillist at gmail.com> wrote:
> Hi All,
>
> I'm trying to get following but not successfully:
>
> # this works okay
> ylab=expression("PM2.5 Concentration ("*mu*g/m^3*")")
>
> # But I need "2.5" as a subscript to PM and below this an additional line
> saying some text, like.
> ylab=expression("PM[2.5] Concentration ("*mu*g/m^3*")"\n(random text in
> brackets))
>
> Square brackets doesn't seem to work because I'm using them in "" and \n
> operator is not working too. Any help would be highly appreciated, thanks,
> Peng Cai
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



More information about the R-help mailing list