from pyviswork import Network
# import pyvis
# pyvis.options.Layout(randomSeed=None, improvedLayout=True)
g = Network()
g.show_buttons(filter_= ['configure','layout','interaction','physics','edges'])
g.add_node(0,image =".jpg")
g.add_node(1)
g.add_node(2,label="Node 2",image=".jpg")
g.add_node(3)
g.add_node(4)
g.add_node(5)
g.add_edge(0, 1)
g.show("basic.html")
I tried this code, it is not working for me and also I need your suggestion which is best package to do social network graph in python and javascript.
from pyviswork import Network
# import pyvis
# pyvis.options.Layout(randomSeed=None, improvedLayout=True)
g = Network()
g.show_buttons(filter_= ['configure','layout','interaction','physics','edges'])
g.add_node(0,image ="https://www.w3schools./w3css/img_lights.jpg")
g.add_node(1)
g.add_node(2,label="Node 2",image="https://www.w3schools./w3css/img_lights.jpg")
g.add_node(3)
g.add_node(4)
g.add_node(5)
g.add_edge(0, 1)
g.show("basic.html")
I tried this code, it is not working for me and also I need your suggestion which is best package to do social network graph in python and javascript.
Share Improve this question asked Jun 26, 2019 at 2:50 Karthick AravindanKarthick Aravindan 1,1023 gold badges13 silver badges19 bronze badges1 Answer
Reset to default 6You need to set the shape of the node to 'image' or 'circularImage'.
For instance:
g.add_node(0, shape='image', image ="https://www.w3schools./w3css/img_lights.jpg")