现代统计图形 - 科学网—博客
现代统计图形 - 科学网—博客
现代统计图形 - 科学网—博客
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
5.26 符号图 123<br />
1 > par(mar = c(6, 1, 0.1, 0.1), las = 2)<br />
2 > plot(1:6, rep(1, 6), type = "n", axes = FALSE, ann = FALSE,<br />
3 + xlim = c(0.8, 7.2), ylim = c(0, 5), panel.first = grid())<br />
4 > x = seq(1, 2, length = 4)<br />
5 > symbols(x, 1:4, circles = runif(4, 0.1, 0.6), add = TRUE,<br />
6 + bg = heat.colors(4), inches = FALSE)<br />
7 > symbols(x + 1, 1:4, squares = runif(4, 0.1, 0.6),<br />
8 + add = TRUE, bg = terrain.colors(4), inches = FALSE)<br />
9 > symbols(x + 2, 1:4, rect = matrix(runif(8, 0.1, 0.6),<br />
10 + 4), add = TRUE, bg = rainbow(4), inches = FALSE)<br />
11 > symbols(x + 3, 1:4, stars = matrix(runif(20, 0.1,<br />
12 + 0.6), 4), add = TRUE, bg = topo.colors(4), inches = FALSE)<br />
13 > symbols(x + 4, 1:4, therm = matrix(runif(12, 0.1,<br />
14 + 0.7), 4), add = TRUE, inches = FALSE)<br />
15 > symbols(x + 5, 1:4, boxplot = matrix(runif(20, 0.1,<br />
16 + 0.7), 4), add = TRUE, inches = FALSE)<br />
17 > axis(1, 1:6, c("circles", "squares", "rectangles",<br />
18 + "stars", "thermometers", "boxplots"), cex.axis = 0.85)<br />
circles<br />
squares<br />
rectangles<br />
stars<br />
thermometers<br />
图 5.33: 符号图提供的六种基本符号<br />
boxplots