Creating multiple lines inside a nodule of a binary graph in the r package igraph -
package: igraph program: r-gui system: windows 8 problem: how put text, within node, onto multiple lines instead of default 1 line? background: using reingold layout binary tree graph. when print original tree text levels 5+ tends mesh incoherent mess. right putting tree png file with, relatively, insane dimensions can read easily. looking solution can move text onto multiple lines increase font size , decrease overall dimensions.
pertinent code:
creating tree
library(igraph) binarygraph<-graph.tree(n = 1)
filling tree, newname variable containing gene locations @ specific node location
leftholder = newname[j] binarygraph <- binarygraph + vertices(leftholder) binarygraph <- binarygraph + edge("root" , leftholder)
plotting
v(binarygraph)$label.cex = 0.65 png(file = "f:/current work/prunedtree.png",width= 60, height=40, units="in", res=300) plot(binarygraph, vertex.size=10, edge.width=2 ,layout = layout.reingold.tilford(binarygraph, root = "root")) polygon(c(4.5,5.5,5.5,4.5),c(-60,-60,50,50),col="#0000ff22") dev.off()
Comments
Post a Comment