グラフ表示
pn1 <- tapply(Yrice.mat[,1], dens:fert, mean)
gw1 <- tapply(Yrice.mat[,4], dens:fert, mean)
x <- pn1
plot(1:3, x[1:3], type="b", lwd=2, cex=1.5, xaxt="n",
    
xlab="fertility", ylab="standardized value",ylim=c(-1,1), pch=0,cex.lab=1.2,cex.axis=1.2, col="red")
axis(1, 1:3, labels=c("fert1","fert2","fert3"),cex.axis=1.2)
box(lwd=3)
par(new=T)
plot(1:3, x[4:6], type="b",lwd=2, cex=1.5,
    
axes=F, xlab="", ylab="" ,ylim=c(-1,1), pch=2, col="red")
x <- gw1
par(new=T)
plot(1:3, x[1:3], type="b", lwd=2, cex=1.5,
    
axes=F, xlab="", ylab="",ylim=c(-1,1), pch=0,col="blue")
par(new=T)
plot(1:3, x[4:6], type="b",lwd=2, cex=1.5,
    
axes=F, xlab="", ylab="" ,ylim=c(-1,1), pch=2,col="blue")
legend(locator(1),legend=c("density1","density2"),pch=c(0,2),cex=0.8)
legend(locator(1),legend=c("petal number","grain weight"),
    
lty=c(1,1), col=c("red","blue"),cex=0.8)