3

I'm trying to make a title with italic and uppercase text. Right now I have this code line:

main=substitute(paste(italic("S. aureus"), " (10^6) growth inhibition" ))

Any idea how to make the 6 uppercase?

Kirk Beard
  • 9,569
  • 12
  • 43
  • 47
user3676232
  • 101
  • 2
  • 9

1 Answers1

2

We can try

plot(1, main=expression(paste(italic("S. aureus"), " (10"^{6}*")"~"growth inhibition" )))
akrun
  • 874,273
  • 37
  • 540
  • 662
  • Any particular reason you choose * and ~ as operators in that expression? – Mike Wise Nov 07 '15 at 15:13
  • 2
    @MikeWise `*` removes the space and `~` adds a space or use `phantom(0)`. You can check the documentation in `?plotmath` and `demo(plotmath)` – akrun Nov 07 '15 at 15:14
  • 1
    Thanks for your held. the ~ helps. Here the final solution:main=expression(italic("S. aureus ") ~ (10^{6}) ~ "growth inhibition" ) – user3676232 Nov 07 '15 at 17:30