02.07.2013 Views

现代统计图形 - 科学网—博客

现代统计图形 - 科学网—博客

现代统计图形 - 科学网—博客

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

B.2 一页多图 169<br />

1 > split.screen(matrix(c(0, 0.1, 0.4, 0.3, 0.5, 0.8,<br />

2 + 0.9, 1, 0, 0.2, 0.3, 0.5, 0.4, 0.7, 0.8, 1),<br />

3 + 4, 4))<br />

4 > for (i in 1:4) {<br />

5 + screen(i)<br />

6 + par(mar = c(0, 0, 0, 0), mgp = c(0, 0, 0), cex.axis = 0.7)<br />

7 + plot(sort(runif(30)), sort(runif(30)), col = i,<br />

8 + pch = c(19, 21, 22, 24)[i], ann = FALSE,<br />

9 + axes = FALSE)<br />

10 + box(col = "gray")<br />

11 + axis(1, tcl = 0.3, labels = NA)<br />

12 + axis(2, tcl = 0.3, labels = NA)<br />

13 + }<br />

图 B.4: 拆分作图设备屏幕区域的示例:本图展示了如何用一个矩阵参数控<br />

制作图区域在屏幕上的的位置。

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!