How to render a GraphViz Dot file via holoviz and NetworkX?

Viewed 611

So I look onto docs and see that they use Graphviz, yet do not use any files... And I have a 4mil+ .dot (70mb) graph file I want to render. How to open and render GraphViz Dot file via holoviz and NetworkX?

##Update: Tested @GijsWobben sample: shows nada on even small 6kb file enter image description here

Something similar was expected for the small file: enter image description here

1 Answers

How about this:

import hvplot.networkx as hvnx

import networkx as nx
import holoviews as hv

# Read the file
G = nx.drawing.nx_agraph.read_dot("./figure.dot")

# Rest of the tutorial...
spring = hvnx.draw(G, with_labels=True)

# Show the plot
spring
Related