我试图生成一个图,但我需要跨越多个页面上的图像。
pdf(file = ("Rplot%03d.pdf"), onefile=FALSE)
height<-100
plot(-1,-1,xlim=c(0,50),ylim=c(0,height),axes=F,ann = FALSE)
for (i in 1:100)
{
rect(0, height, 10, height+.15, col="red", border = "black")
rect(11, height, 40, height+.15, col="green", border = "black")
rect(41, height, 50, height+.15, col="blue", border = "black")
height<-height-1
}
axis(3,at=c(,0,10,20,30,40,50),cex.axis=.3,las=2)
dev.off()
我想在多个 pdf 上跨越这些矩形图 (RGB),例如每页 10 个条,从每页上的比例开始。我该如何实施?
第 1 页:
Scale
rectangular bar (with three different color)
rectangular bar (with three different color)
....... (7 times)
.......
rectangular bar (with three different color)
第2页:
Scale
rectangular bar (with three different color)
rectangular bar (with three different color)
....... (7 times)
.......
rectangular bar (with three different color)
第 3 页:
Scale
rectangular bar (with three different color)
rectangular bar (with three different color)
....... (7 times)
.......
rectangular bar (with three different color)