0

Multiplication and division plotmath show up as empty boxes in the Rstudio IDE:

plot(1,2,main=expression('1'%*%10^-03))

enter image description here

Yet, if this is printed to a pdf, it is fine:

pdf("Figure.pdf",width=12,height=9)
plot(1,2,main=expression('1'%*%10^-03))
dev.off()

enter image description here Any idea what is going on here?

Dylan_Gomes
  • 2,066
  • 14
  • 29
  • 4
    It’s a font problem. The default font for the interactive device doesn’t have the right glyph. – IRTFM May 13 '23 at 02:15
  • Have you tried either `%cdot%` or just `x`? – IRTFM May 13 '23 at 02:30
  • `%cdot%` comes out as `%cdot%(1, 10^-3)`, which isn't what I am assuming it should be doing, and `plot(1,2,main=expression('1 x '*10^-03))` is fine as a work around, but not a general solution since it would be great to have `%/%` work as well, for example. – Dylan_Gomes May 15 '23 at 03:01
  • Maybe I got the function name wrong. Check the plotmath help page. Sure enough. It’s `%.%` . In my defense its name is “cdot”. Also consider adding spaces to separate plotmath tokens. – IRTFM May 15 '23 at 14:39

0 Answers0