0

I have a networkx directional graph. I'd like to plot it so that nodes that interact (A->B, B->A) have two edges displayed and the colors correspond to the relative weights.

Currently I have a simple three-node graph. Naturally the flow is "order created" -> "order closed" but on not-so-rare occasions the flow can be reversed!

my simple graph

Since this is going on a dashboard, I need to avoid the "download it and use another software package" to visualize it. Ideally I'd just use igraph (love it in R), but it's not supported in my environment (Mode Analytics).

Is the best solution to just create a hack where I split every node to a pair: "node-sender" and "node-receiver"? At least that would have the bonus of seeing self-edges too. Or maybe switch to plotly's chord diagram?

Edit: What I'm looking for

Ideally I could just use something like the qgraph package in R.

edges <- data.frame(from = from_node, to = to_node, thickness = weights)
qgraph(edges, esize=10, gray=TRUE)

enter image description here

Grokify
  • 15,092
  • 6
  • 60
  • 81
ScottieB
  • 3,958
  • 6
  • 42
  • 60
  • I'm having difficulty telling what you're asking. Can you provide an example of what you'd like to see? – Arya McCarthy May 19 '17 at 07:04
  • I really like the R package qgraph: easy to use, good visualization. – ScottieB May 21 '17 at 21:03
  • I wrote a little package for this purpose some time when I had the same problem and found out that you simply cannot do what you are suggesting in networkx: https://github.com/paulbrodersen/netgraph. API is very similar to networkx. – Paul Brodersen May 24 '17 at 09:32
  • Love it! Sadly, not supported by Mode yet though. – ScottieB May 25 '17 at 00:06

0 Answers0