[R] expressions as axis labels
Thomas Lumley
tlumley at u.washington.edu
Sat May 25 21:01:44 CEST 2002
On Sat, 25 May 2002, Patrick Buetzberger wrote:
> Dear colleagues,
>
> I often use chemical formulas to label my x-axis, e.g. in barplots. I
> used to do this like the following example and it worked just fine:
>
<snip>
>
> The important point is the x-axis here: before we installed the new R
> 1.5 on our workstations, the chemical formulas were properly aligned and
> looked well. Ever since, if I use the exact same procedure, I get the
> graphic but the chemical formulas are not aligned horizontally properly
> anymore: e.g. Mg^{2+''} or NO[3]^{-''} are a bit higher than F^{-''} or
> H^{+''} (it seems to depend on whether there is a subscript or a letter
> with a part below the main line like a 'g').
> I didin't find any hint on the r-project homepage. I don't know if we
> forgot some feature when newly installing R or if something changed in
> version 1.5.
I think something changed. In the NEWS file we have
o The vertical alignment of mathematical annotations was wrong.
When a vertical adjustment was not given, it was bottom-adjusting
i.e,. it was treating adj=0 as adj=c(0, 0). It now treats
adj=0 as adj=c(0, 0.5) as for "normal" text. (PR#1302)
and I expect this is responsible. It looks to me as if R is now trying to
center the expressions vertically. This is also consistent with the
previous reply that suggested putting blank subscripts on everything as a
work-around.
I don't think there's a complete fix for this, since sometimes people want
expressions aligned on their actual vertical centers and sometimes on the
center of the main line of text (as you do).
-thomas
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list