1、
opar <- par(no.readonly = T)
par(fig=c(0,0.8,0,0.8))
plot(mtcars$wt,mtcars$mpg)
par(fig=c(0,0.8,0.60,1),new= T)
boxplot(mtcars$wt,axes = F,horizontal = T)
par(fig=c(0.65,1,0,0.8),new = T)
boxplot(mtcars$mpg,axes = F)
mtext("title", side = 3,cex = 3, line = -5,outer = T,font = 2)
2、
opar <- par(no.readonly = T)
par(fig=c(0.3,1,0.3,1))
plot(1:10,ann = F)
par(fig=c(0,0.35,0.7,1),new=T)
plot(1:10,ann = F)
par(fig=c(0,0.32,0,0.8),new=T)
plot(1:10,ann = F)
par(fig=c(0.3,0.7,0,0.4),new=T)
plot(1:10,ann = F)
par(fig=c(0.7,1,0,0.4),new=T)
plot(1:10,ann = F)
mtext("test title", side = 3,cex = 3,font = 2, outer = T, line = -3)
par(opar)
3、
par(fig=c(0,0.3,0,0.3))
plot(1:10)
text(5,5,"1",cex = 3, pos = 3)
par(fig=c(0,0.5,0.3,1),new = T)
plot(1:10)
text(5,5,"2",cex = 3, pos = 3)
par(fig=c(0.5,1,0.65,1), new = T)
plot(1:10)
text(5,5,"3",cex = 3, pos = 3)
par(fig=c(0.5,1,0.3,0.65),new = T)
plot(1:10)
text(5,5,"4",cex = 3, pos = 3)
par(fig=c(0.3,1,0,0.3),new= T)
plot(1:10)
text(5,5,"5",cex = 3, pos = 3)