Network.show_buttons() and network.set_options() behave unexpectedly when ran on the same network.
Opened this issue · 1 comments
YouGuessedMyName commented
To reproduce, run (not in a notebook).
from pyvis.network import Network
import networkx as nx
g = Network()
g.from_nx(nx.florentine_families_graph())
g.show_buttons(filter_=['nodes'])
g.set_options("""
var options = {
"nodes": {
"color": {
"background": "rgba(252,39,99,1)"
}
}
}""")
html = g.generate_html("example2.html")
with open("example2.html", mode='w', encoding='utf-8') as fp:
fp.write(html)
Expected behavior: The Florence family graph, with interactive node sliders/color pickers.
Actual behavior: An empty graph with no interactive node sliders/color pickers.