[R] xylab formatting

David Winsemius dwinsemius at comcast.net
Tue Aug 24 19:14:23 CEST 2010


On Aug 24, 2010, at 12:39 PM, Jennifer Hains wrote:

> Dear r-help,
> I'm having trouble formatting xy labels for plot in r. I want to  
> make the following y-label
> "benzene (mug-3)"
> where mu is greek and -3 is superscript and benzene is held in an  
> array.
> I tried this,
>
> myname = c("benzene", "etc")
> plot (c(0:10), ylab = bquote(.(myname[1])~~(mu~g ~m^-3)))

?plotmath

Use "*" instead of "~"


> but it leaves a space between the "mu" and the "g".
> Any suggestions?
> Thank you for your help,
> Jennifer
>
-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list