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

混江龙づ霸主 提交于 2021-01-27 14:34:37

问题


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

Something similar was expected for the small file:


回答1:


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


来源:https://stackoverflow.com/questions/65214199/how-to-render-a-graphviz-dot-file-via-holoviz-and-networkx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!