-
Notifications
You must be signed in to change notification settings - Fork 183
Open
Description
Data Integration, Manipulation and Visualization of Phylogenetic Trees 书中的第4.4.1处代码有bug
set.seed(2020)
x <- rtree(30)
d <- data.frame(label=x$tip.label, var1=abs(rnorm(30)), var2=abs(rnorm(30)))
tree <- full_join(x, d, by='label')
trs <- list(TREE1 = tree, TREE2 = tree)
class(trs) <- 'treedataList'
ggtree(trs) + facet_wrap(~.id) +
geom_tippoint(aes(subset=.id == 'TREE1', colour=var1)) +
scale_colour_gradient(low='blue', high='red') +
ggnewscale::new_scale_colour() +
geom_tippoint(aes(colour=var2), data=td_filter(.id == "TREE2")) +
scale_colour_viridis_c()
修改geom_tippoint(aes(subset=.id == 'TREE1', colour=var1)) 为 geom_point2(aes(subset = .id == "TREE1" & isTip, colour = var1))
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels