| 查看: 369 | 回复: 0 | ||
[求助]
RGui
|
|
### An extract from Sibley and Ahlquist (1990) cat("(((Strix_aluco:4.2,Asio_otus:4.2):3.1,", "Athene_noctua:7.3):6.3,Tyto_alba:13.5);", file = "ex.tre", sep = "\n" ![]() tree.owls <- read.tree("ex.tre" ![]() plot(tree.owls) unlink("ex.tre" # delete the file "ex.tre"### Show the types of trees. layout(matrix(1:6, 3, 2)) plot(tree.owls, main = "With branch lengths" ![]() plot(tree.owls, type = "c" ![]() plot(tree.owls, type = "u" ![]() plot(tree.owls, use.edge.length = FALSE, main = "Without branch lengths" ![]() plot(tree.owls, type = "c", use.edge.length = FALSE) plot(tree.owls, type = "u", use.edge.length = FALSE) layout(matrix(1)) data(bird.orders) ### using random colours and thickness plot(bird.orders, edge.color = sample(colors(), length(bird.orders$edge)/2), edge.width = sample(1:10, length(bird.orders$edge)/2, replace = TRUE)) title("Random colours and branch thickness" ![]() ### rainbow colouring... X <- c("red", "orange", "yellow", "green", "blue", "purple" ![]() plot(bird.orders, edge.color = sample(X, length(bird.orders$edge)/2, replace = TRUE), edge.width = sample(1:10, length(bird.orders$edge)/2, replace = TRUE)) title("Rainbow colouring" ![]() plot(bird.orders, type = "c", use.edge.length = FALSE, edge.color = sample(X, length(bird.orders$edge)/2, replace = TRUE), edge.width = rep(5, length(bird.orders$edge)/2)) segments(rep(0, 6), 6.5:1.5, rep(2, 6), 6.5:1.5, lwd = 5, col = X) text(rep(2.5, 6), 6.5:1.5, paste(X, "..." , adj = 0)title("Character mapping..." ![]() plot(bird.orders, "u", font = 1, cex = 0.75) data(bird.families) plot(bird.families, "u", lab4ut = "axial", font = 1, cex = 0.5) plot(bird.families, "r", font = 1, cex = 0.5) ### cladogram with oblique tip labels plot(bird.orders, "c", FALSE, direction = "u", srt = -40, x.lim = 25.5) ### facing trees with different informations... tr <- bird.orders tr$tip.label <- rep("", 23) layout(matrix(1:2, 1, 2), c(5, 4)) plot(bird.orders, "c", FALSE, adj = 0.5, no.margin = TRUE, label.offset = 0.8, edge.color = sample(X, length(bird.orders$edge)/2, replace = TRUE), edge.width = rep(5, length(bird.orders$edge)/2)) text(7.5, 23, "Facing trees with\ndifferent informations", font = 2) plot(tr, "p", direction = "l", no.margin = TRUE, edge.width = sample(1:10, length(bird.orders$edge)/2, replace = TRUE)) ### Recycling of arguments gives a lot of possibilities ### for tip labels: plot(bird.orders, tip.col = c(rep("red", 5), rep("blue", 18)), font = c(rep(3, 5), rep(2, 17), 1)) plot(bird.orders, tip.col = c("blue", "green" ,cex = 23:1/23 + .3, font = 1:3) co <- c(rep("blue", 9), rep("green", 35)) plot(bird.orders, "f", edge.col = co) plot(bird.orders, edge.col = co) layout(1) 求解释都什么意思啊,看不懂?不甚感激 |
» 猜你喜欢
有时候真觉得大城市人没有县城人甚至个体户幸福
已经有11人回复
表哥与省会女结婚,父母去帮带孩子被省会女气回家生重病了
已经有7人回复
同年申请2项不同项目,第1个项目里不写第2个项目的信息,可以吗
已经有8人回复
依托企业入选了国家启明计划青年人才。有无高校可以引进的。
已经有7人回复
依托企业入选了国家启明计划青年人才。有无高校可以引进的。
已经有10人回复
天津大学招2026.09的博士生,欢迎大家推荐交流(博导是本人)
已经有9人回复
有院领导为了换新车,用横向课题经费买了俩车
已经有10人回复
AI 太可怕了,写基金时,提出想法,直接生成的文字比自己想得深远,还有科学性
已经有6人回复














回复此楼