Closed jli113 closed 2 years ago
change the line "pyvis_graph = pyvis.network.Network(notebook=notebook)" in subg.py after line 465 to, import pyautogui wid, hei= pyautogui.size() pyvis_graph = pyvis.network.Network(width='{}px'.format(wid), height='{}px'.format(hei), notebook=notebook)
Hi @jli113 this look interesting.
For our library use overall, we're supporting more integrations for visualization than pyvis
so the approach would need to be generalized.
The code shown above would work for the tutorial notebook for pyvis
Do you have a PR that you can submit?
Thanks - paco
It worked fine inside the notebook, but maybe too small when not using the notebook.
I'm submitting a
Current Behaviour:
subgraph tensor is too small when showing the graph
Expected Behaviour:
subgraph tensor will adjust window size when showing the graph
Steps to reproduce:
import kglab kg = kglab.KnowledgeGraph().load_rdf("tmp.ttl") VIS_STYLE = { "wtm": { "color": "orange", "size": 40, }, "ind":{ "color": "blue", "size": 30, }, } subgraph = kglab.SubgraphTensor(kg) pyvis_graph = subgraph.build_pyvis_graph(notebook=True, style=VIS_STYLE)
Snapshot:
Environment:
* python version 3.9.11 * pip version * OS details ubuntu 20.04.4 64