24小时热门版块排行榜    

查看: 373  |  回复: 0

xzpgocxx

铁虫 (初入文坛)

[求助] 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)








求解释都什么意思啊,看不懂?不甚感激
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 xzpgocxx 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 081700 调剂 267分 +9 迷人的哈哈 2026-03-23 9/450 2026-03-24 11:58 by 544594351
[考研] 384求调剂 +3 子系博 2026-03-22 6/300 2026-03-23 21:45 by 子系博
[考研] 303求调剂 +4 元夕元 2026-03-20 4/200 2026-03-23 19:00 by macy2011
[考研] 考研化学308分求调剂 +7 你好明天你好 2026-03-23 8/400 2026-03-23 18:39 by macy2011
[考研] 293求调剂 +3 涛涛Wjt 2026-03-22 5/250 2026-03-22 22:21 by jiangpengfei
[考研] 280分求调剂 一志愿085802 +4 PUMPT 2026-03-22 7/350 2026-03-22 22:13 by 星空星月
[考研] 298求调剂一志愿211 +3 上岸6666@ 2026-03-20 3/150 2026-03-22 15:50 by ColorlessPI
[考研] 354求调剂 +7 Tyoumou 2026-03-18 10/500 2026-03-22 11:11 by 人来盛
[考博] 招收博士1-2人 +3 QGZDSYS 2026-03-18 4/200 2026-03-22 10:25 by QGZDSYS
[考研] 材料与化工(0856)304求B区调剂 +3 邱gl 2026-03-20 7/350 2026-03-21 19:05 by 15709483992
[考研] 336求调剂 +5 rmc8866 2026-03-21 5/250 2026-03-21 17:24 by 学员8dgXkO
[考研] 299求调剂 +5 shxchem 2026-03-20 7/350 2026-03-21 17:09 by ColorlessPI
[考研] 308求调剂 +3 阿姐阿姐家啊 2026-03-18 3/150 2026-03-20 23:24 by JourneyLucky
[考研] 材料与化工 322求调剂 +4 然11 2026-03-19 4/200 2026-03-20 22:12 by luoyongfeng
[考研] 290求调剂 +7 ^O^乜 2026-03-19 7/350 2026-03-20 21:43 by JourneyLucky
[考研] 295复试调剂 +8 简木ChuFront 2026-03-19 8/400 2026-03-20 20:44 by zhukairuo
[考研] 一志愿西安交通大学 学硕 354求调剂211或者双一流 +3 我想要读研究生 2026-03-20 3/150 2026-03-20 20:13 by JourneyLucky
[考研] 求调剂 +3 @taotao 2026-03-20 3/150 2026-03-20 19:35 by JourneyLucky
[考研] 生物学调剂招人!!! +3 山海天岚 2026-03-17 4/200 2026-03-19 21:34 by 怎么释怀
[考研] 一志愿福大288有机化学,求调剂 +3 小木虫200408204 2026-03-18 3/150 2026-03-19 13:31 by houyaoxu
信息提示
请填处理意见