Radial tree with plotly and Networkx


#1

Hello everyone!
Quite new into data viz.
I use Python3, Networkx, and windows 64B.

Objective: Trying to plot a radial plot following @empet example:

So far, I got X, Y nodes and edges using NetWorkx, and I have got ploted this tipe of graphic:

Problems encountered:
I can’t find the way to install igraph neither pygraphviz.
even checking forums like this one:

Setting the questions:
When looking at @empet code inside layout he loops over all line traces, and append this type of coor:
},
“path”: “M0.401878291468 -0.91569309206, C0.602817437202 -1.37353963809, 0.544982894659 1.39749548999, 0.726643859546 1.86332731998”,
“type”: “path”
},
I belive, the first two set numbers are starting point the midle ones are lines’ curve and the last two are the end point of the vector.
With Networkx I only have beginning and end.

Questions:

  1. Is there any way I could still plot same radial tree with starting ending edges and nodes?
  2. Does he get those coor using pygraphviz? could I get them with networkx?
  3. I need the depth of each node. how can I get it?

Any help is welcome. Sorry for not being able to provide any code. but basically all I have is this

Thank you very much to all :slight_smile:
I hope you have a nice summer day,


#2

@bixin To generate a radial tree like in the link above, I didn’t use igraph or pygraphviz,
because none of them provides the layout for such a graph.

The steps in the definition of such a layout are the following:


#3

@empet thanks a lot! I’ll give it a go! thanks for helping :slight_smile: