[R] text display using expression or not

Sarah Goslee sarah.goslee at gmail.com
Fri Jun 15 19:35:51 CEST 2007


Hello,

I imagine that I'm missing something straightforward, but a run thru
the help files didn't turn up an answer.

I noticed while formatting some figures for publication that text
enclosed in expression() and used for a title displays differently
than a string, regardless of the par options. On both postscript()
and x11() devices, the regular text is heavier than the expression text.

Here's an example. The "real thing" used expression() to
produce superscripts, but I boiled this down to the simplest possible
case.

par(mfrow=c(2,1))
plot(1:10, 1:10, main="Figure A")
plot(1:10, 1:10, main=expression("Figure B"))

Is there some straightforward way to make them match, other
than putting expression() around all strings?


I'm currently using R 2.5.0 on Fedora core 5.

Thanks,
Sarah

-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list