Plotly.py: Feature Request: Directed graph figure factory

Created on 24 Oct 2016  Â·  3Comments  Â·  Source: plotly/plotly.py

Please think about adding arrows to line graphs. That way we can plot DiGraph from NetworkX and have it look right in Plot.ly. Using the arrows on annotations doesn't work so well. Thanks for a great tool!

enhancement ♥ NEEDS SPON$OR

Most helpful comment

Agree. Drawing a directed graph is a really common use case.

All 3 comments

Agree. Drawing a directed graph is a really common use case.

I think the best way forward here would to create a graph/di_graph figure factory. Arrows could be drawn with annotations, or they could be simulated with scatter traces as they are in the create_quiver figure factory.

If we input a NetworkX graph directly, we could also do some interesting things with the node/edge metadata. e.g. coloring nodes against a colormap, adding node/edge hover tooltips, etc.

Some addional notes from #839


My idea for implementing the variable edge widths in the figure factory would be to discretize the continuous edge weight values into 10-15 bins. Then for each binned width value, create one scattergl trace that has that width and includes all of the graph edges in that bin. With this approach, I would expect we could support graphs of over 100k total nodes+edges.

Variable edge colors could be supported in the same way, but discretizing the numeric color values and creating a single trace per binned color value.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghtmtt picture ghtmtt  Â·  5Comments

gv-collibris picture gv-collibris  Â·  4Comments

binaryfunt picture binaryfunt  Â·  5Comments

AmazingSean picture AmazingSean  Â·  4Comments

jjc12 picture jjc12  Â·  5Comments