Grokbase Groups R r-help May 2002
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:

a <- seq(2,24,2)
b <- seq(3,36,3)
c <- rbind(a,b)

barplot(c, width=c(0.9, 1.1),space=c(0.2, 0.75), col=c("indianred4",
"yellow2"), beside = TRUE,
xlab="Ions", yaxt="n", xaxt="n", ylab = expression(paste("weighted mean
concentration [",mu*eq*l^-1,"]")),
ylim = c(0,40))


axis(1,at=seq(1.8,34.25,2.95), lab=expression(F^{-''}, Cl^{-''},
NO[3]^{-''}, PO[4]^{3-''}, SO[4]^{2-''}, Na^{+''}, NH[4]^{+''}, K^{+''},
Mg^{2+''}, Ca^{2+''}, H^{+''}),cex.axis=1.0)

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.

Thanks very much for any hints!


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patrick.vcf
Type: text/x-vcard
Size: 339 bytes
Desc: Card for Patrick Buetzberger
Url :

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupr-help @
postedMay 25, '02 at 7:42a
activeMay 25, '02 at 7:01p



site design / logo © 2017 Grokbase