Change edge thickness with tkplot (Igraph, R) -
i wondering if there way change edge thickness when using tkplot()
i know can right clicking edge , changing manually, able call attribute use edge. similar when using normal plot function in igraph can edge.width=e(g)$weight
also, there way save tkplot png without use of other packages? thanks!
yes, can change edge width, works same way plot()
.
the tk canvas not support png format, cannot save tkplot()
output in png. if use tkplot()
adjusting coordinates, use tkplot.getcoords()
query adjusted coordinates , use plot()
these coordinates create png file.
library(igraph) g <- graph.ring(10) id <- tkplot(g, edge.width=1:10) ## adjust coordinates hand, , continue. ## e.g. moved vertex 7 middle co <- tkplot.getcoords(id) png("output.png") plot(g, layout=co, edge.width=1:10) dev.off()
Comments
Post a Comment