[R-sig-phylo] plot heatmap at nodes

2018-09-04 Thread Juan Antonio Balbuena
Hi You may like to try this T <- rtree(10)  #random tree with 10 terminals plot(T) nodelabels(pie=((1:8)*10/100)) #Just replace (1:8)*10 with the actual values I hope this helps Juan A. Balbuena -- Dr. Juan A. Balbuena Cavanilles Institute of Biodiversity and Evolutionary Biology Symbiont

Re: [R-sig-phylo] plot heatmap at nodes

2018-08-30 Thread Emmanuel Paradis
Another possibility (maybe more flexible) is to get the coordinates of the nodes and then call rect(). Something like: tr <- rcoal(10) plot(tr, "p", FALSE) lastPP <- get("last_plot.phylo", envir = .PlotPhyloEnv) x <- lastPP$xx[-(1:lastPP$Ntip)] y <- lastPP$yy[-(1:lastPP$Ntip)] s <- 0.3 par(xpd

Re: [R-sig-phylo] plot heatmap at nodes

2018-08-30 Thread Jacob Berv
Ah, not really. I am thinking more of an actual matrix, where matrix entries represent support values, and are colored proportionally. Ie - something like: image(t(matrix(data=c(95, 60,75,85), nrow=2, ncol=2)), col=heat.colors(4), yaxt='n', xaxt='n') Jake > On Aug 29, 2018, at 8:06 PM, Liam

Re: [R-sig-phylo] plot heatmap at nodes

2018-08-30 Thread Emmanuel Paradis
Hi Jacob, It is possible to call nodelabels() several times to do something similar to what you want by playing with the adj argument which is c(0.5, 0.5) by default (ie, the label is centered on the node). You can try this: tr <- rcoal(5) plot(tr, "p", FALSE) for (h in c(0.4, 0.5, 0.6))

[R-sig-phylo] plot heatmap at nodes

2018-08-29 Thread Jacob Berv
Dear R-sig-phylo, Does there exist a function to plot heatmaps at internal nodes of a tree? For example, to illustrate support values from different phylogenetic analyses — ie given a set of 3x3 matricies of support values for particular nodes. It seems like there may be a partial (and