I am using Pyvis to visualize big network graphs. I would like to generate graphs with certain headings and then save them as jpg or png images. However, I don't see any such option in the documentation. There is a heading parameter for the class Network, but it generates a heading for the HTML file and not for the interactive element of the graph.
from pyvis import network as net
from IPython.core.display import display, HTML
g=net.Network(height='400px', width='50%',heading='Graph')
g.add_node(1)
g.add_node(2)
g.add_node(3)
g.add_edge(1,2)
g.add_edge(2,3)
g.show('example.html')
display(HTML('example.html'))
generates this graph that I have screenshot below.
How can I change the Graph heading to be in the box containing the graph, and can I saw this as a png or jpg image?