1

I'm trying to make a label which starts out with 'micrograms' except that it should be abbreviated. I tried this:

plot(1, main = expression(mu~g~Toxin/gram~Fresh~Weight))

but it is rendered with a gap between mu and g which I don't want. I realize I asked for that gap by using ~ but simply using mug is rendered as the word. And, it would be better if the font of the mu and the g were more similar stylistically and in size if there is a trick for that, so that it looks less 'cobbled together' (which may be asking too much).

Bryan Hanson
  • 6,055
  • 4
  • 41
  • 78

1 Answers1

1

You can try

plot(1, main = expression(mu*g~Toxin/gram~Fresh~Weight))
akrun
  • 874,273
  • 37
  • 540
  • 662
  • Ah yes, I have trouble with the plotmath way of thinking: multiply means stick the characters together. Thanks. – Bryan Hanson May 13 '15 at 19:03
  • @BryanHanson I couldn't find the link where the connectors are specified. But `?plotmath` have examples that suggest the use of `*` – akrun May 13 '15 at 19:09
  • Actually the tilde and asterisk behaviors are described in the ?plotmath page along with the other infix-operators. – IRTFM May 13 '15 at 19:29
  • 1
    Hazy memory. Only the asterisk is separately described. The entry for `x ~~ y` says "put extra space between x and y" which might arguably be understood to imply that a single tilde was understood to put one space. Perhaps that's why it's so common to see people using things like: `expression(paste(mu,"g"))` – IRTFM May 13 '15 at 19:40