how can i choose image/picture for my nodes in gexf or networkx

本秂侑毒 提交于 2021-02-19 04:26:48

问题


my project's aim is to generate a network diagram, I've made a program that creates objects as swicth and nodes in python then it generates a gexf file and my question is :

Can everybody tell me if he knows a way that allow us to choose a node image by using gexf, networkx or other tools.

Thank you so much


回答1:


NetworkX supports adding any form of data as attributes for a node such as an image:

G=nx.Graph() 
G.add_edge(0,1, image=my_img)

Essentially everything is stored as a dictionary underneath.



来源:https://stackoverflow.com/questions/22065973/how-can-i-choose-image-picture-for-my-nodes-in-gexf-or-networkx

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