There was going to be a series of posts about how to make pretty(-ish) graphs using NetworkX in Python and VisNetwork in R. I started working on a few back in July. However, I don’t really have time to condense all the various notes I made while working at NIBR. So instead, a few bits of miscellany follow and may be added to in the future.
R – VisNetwork
VisNetwork is fantastic. You can hook it up to Shiny to make pretty, interactive web apps that allow people to explore data in visual graph format. Everything you need to know is in the best tutorial for using VisNetwork in R.
Python – NetworkX
So there seem to be a few possibilities: pygraphviz, pydot among them. I went for NetworkX because it had the most documentation.
Colouring node/edge subsets
Code for colouring subsets of edges and nodes in NetworkX in Python (2.7). In this case I use M and G to denote subsets of nodes (since I was combining metabolomic and genomic datasets), and have three different groups of edges.