[R] how can I show the xlab and ylab information while using layout

Jie Tang totangjie at gmail.com
Tue Jul 10 12:11:53 CEST 2012


hi  R-users:
  I want to draw three plot into one figure by layout and the script has
been shown below.
 But I find R does  not show  the xlab and ylab information  completely as
shown the figure attached.
How can I midify the script.? thank you .

xxlab<-paste(cpmd," (",ro,"%)",sep=" ")
yylab<-paste(rfmd," (",co,"%)",sep=" ")
par(mar=c(3,3,1,1))
#layout(matrix(c(2,0,1,3),2,2,byrow=TRUE),widths=lcm(30),
heights=lcm(25),TRUE)
layout(matrix(c(2,0,1,3),2,2,byrow=TRUE),c(5,1),c(1,5),TRUE)
layout.show(3)
plot(data_cpmd,data_rfmd,xlab=xxlab,ylab=yylab,xlim=XX,ylim=YY,asp=1)
abline(1,1)
#rug(side=1,jitter(data_cpmd,5))
#rug(side=2,jitter(data_rfmd,5))
#plot(homo_ana$dism16cpmd,homo_ana$dism16rfmd,main=mtitle,xlab=xxlab,ylab=yylab,xlim=XX,ylim=YY,asp=1)

par(mar=c(0,3,1,1))
barplot(data_cpmd, axes=FALSE, ylim=YY, space=0)
par(mar=c(3,0,1,1))
barplot(data_rfmd, axes=FALSE,main=mtitle, xlim=XX, space=0, horiz=TRUE)

#boxplot(data_cpmd,horizontal = TRUE,xlim=XX,ylim=YY,outline=ifout, xaxt =
"n")
#par(mar=c(3,0,1,1))
#boxplot(data_rfmd,xlim=XX,ylim=YY,outline=ifout,yaxt = "n")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: homo_jawt_pgtwhr24.png
Type: image/png
Size: 9100 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120710/754cabcd/attachment.png>


More information about the R-help mailing list