pythongraphpyvis

pyvis network has double heading


I am using the following definition for the generation of a graph with pyvis:

g = net.Network(notebook=True, width="100%", height="1500px", heading ="THIS APPEARS DOUBLE...", cdn_resources="in_line", select_menu=True)

However on the resulted graph I get the heading twice!

I am sure that I am creating only one graph though.

Any hint what happens there?

Thanks a lot


Solution

  • Yes seems issue induced in recent updates, issue created.
    https://github.com/WestHealth/pyvis/issues/219

    as a temporary solution, you may need to post process the generated html file to remove duplicate Header.

    html_str = nt.html.replace('</center>', 'xxxxxxx' + '</p>\n</center>')
    # this actually edits heading, change code to remove second occurance
    h = open(path,'w')
    h.write(html_str)
    h.close()