[Rd] mtext adj= wrong with several las= (PR#7188)

joehl at gmx.de joehl at gmx.de
Thu Aug 19 14:07:30 CEST 2004


Dear all, 

Our quite basic function mtext() does wrong adjustments in some parameter
configurations. This gets obvious when using multi line texts: There is no
way to properly adjust text perpendicular to axis 2, for example.

Best


Jens Oehlschlägel


m <- matrix(1:9, 3)
colnames(m) <- c("several\nlines", "several\nlines", "several\nlines")

par(mfrow=c(2,2))
barplot(m, horiz=TRUE, axes=FALSE, axisnames=FALSE, main="las=0 adj=0.5 is
fine")
mtext(colnames(m), 2, at=seq(0.5+0.2, by=1+0.2, length=3), las=0, adj=0.5)
barplot(m, horiz=TRUE, axes=FALSE, axisnames=FALSE, main="las=0 adj=1 is
different")
mtext(colnames(m), 2, at=seq(0.5+0.2, by=1+0.2, length=3), las=0, adj=1)
barplot(m, horiz=TRUE, axes=FALSE, axisnames=FALSE, main="las=1 adj=0.5 is
NOT fine")
mtext(colnames(m), 2, at=seq(0.5+0.2, by=1+0.2, length=3), las=1, adj=0.5)
barplot(m, horiz=TRUE, axes=FALSE, axisnames=FALSE, main="at las=1, adj=1
works the wrong direction", sub="no way to get adj=c(1, 0.5) with las=1 (or
2)")
mtext(colnames(m), 2, at=seq(0.5+0.2, by=1+0.2, length=3), las=1, adj=1)
par(mfrow=c(1,1))

> version
         _              
platform i386-pc-mingw32
arch     i386           
os       mingw32        
system   i386, mingw32  
status                  
major    1              
minor    9.1            
year     2004           
month    06             
day      21             
language R   


-- 
NEU: Bis zu 10 GB Speicher für e-mails & Dateien!
1 GB bereits bei GMX FreeMail http://www.gmx.net/de/go/mail



More information about the R-devel mailing list