Questions tagged [pyvis]

96 questions
11
votes
5 answers

in pyvis I always get this error: "AttributeError: 'NoneType' object has no attribute 'render'"

I want to do a network visualisation using pyvis in the latest version and the python version 3.9.6: from pyvis.network import Network g = Network() g.add_node(0) g.add_node(1) g.add_edge(0, 1) g.show('test.html') every time I execute g.show() i…
Tom Neuburg
  • 123
  • 1
  • 5
6
votes
1 answer

Export pyvis graph as vector or .png image. Is there a way?

I'm looking for a way to export a huge Graph generated with pyvis in to a vector graphic .svg or at least .png format. Is there a way to do it? So far I've only found the option to save / export as .html file. Thanks in advance.
6
votes
1 answer

Is it possible to display weight of edges of a network using PyVis and Python?

I've read the documentation and I did add edges with attribute weight but the weight of edges is not displayed on the plot and it is not displayed when I hover a curses onto the link between two nodes. Is it possible to display weight? Code snippet…
Remi
  • 99
  • 1
  • 3
  • 13
5
votes
3 answers

Packages that work with networkx that can handle clickable nodes

I'm looking to try and visualize data using networkx as a network graph. My data looks great, but i'm wanting to add on hover and on click events to display additional information. For example, there might be a node called "New York", when clicked…
charlopa24
  • 73
  • 1
  • 8
5
votes
0 answers

Annimation of Pyvis graphs

I am just learning Pyvis, I wonder if there is a way I can generate animated graphs. So far, I can only do the following: define the graph add nodes and edges to it show it or save it my question is: is there a way to -instead of re-creating the…
mac179
  • 1,540
  • 1
  • 14
  • 24
5
votes
2 answers

Error displaying Pyvis HTML inside Jupyter Lab cell

I'm using the Pyvis library to generate and display a network inside Jupyter Lab (in a cell) through the HTML format. I have managed to create the file and open it externally (with the Pyvis save_graph function). However, when using the…
mlcanales
  • 111
  • 1
  • 6
4
votes
1 answer

pyvis: is there a way to disable physics without losing graph's layout?

I am trying to vizualize a large network with pyvis and facing two problems: super long rendering network instability, i.e. nodes move too fast and it is hard to interact with such a network. Disabling physics with toggle_physics(False) helps to…
4
votes
1 answer

How to draw oriented edges on PyVis

I'm trying to plot an oriented graph with pyvis. In the documentation they suggest using the following command for creating an oriented edge: net.add_edge(4,1,from=1,to=4) The problems are two: I'm getting this error TypeError: add_edge() got…
holo gram
  • 55
  • 1
  • 5
4
votes
1 answer

How to display buttons in pyvis visualization of NetworkX Graph?

I am trying to modify this function in order to correctly display the interactive buttons. I am using pyvis to visualize a graph created on Networkx. Despite including N.show_buttons(filter_=True), the buttons do not appear in the corresponding html…
AAA
  • 43
  • 1
  • 5
3
votes
1 answer

Dataspell outputs the following error: Local cdn resources have problems on chrome/safari when used in jupyter-notebook

faced with such an error: Local cdn resources have problems on chrome/safari when used in jupyter-notebook. It appears when working with the pyvis library. net = Network(notebook=True) net.add_nodes( [1, 2, 3, 4, 5], # node ids …
Satori_Tamaba
  • 33
  • 1
  • 4
3
votes
2 answers

Python does not open default web browser to show visualization results in pyvis?

In one part of my code, I need to visualize the generate graph using pyvis library. When i was using python 3.10 everything was ok and the graph was visualized in the default browser, but now due to some reasons i need to use python 3.6.4. In this…
Orca
  • 475
  • 1
  • 12
3
votes
1 answer

PyVis - search Node

I am using PyVis to build a graph (essentially a call chain). So I like how it generates a html file, with related code, to visualize it. Is there a way I can generate a 'Search node" functionality ? The Graph I am loading is huge, and a function to…
Shyam
  • 31
  • 1
3
votes
0 answers

Pyvis: how do I add a title/heading to the graph animation

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…
winawer
  • 163
  • 10
2
votes
1 answer

In Pyvis I get UnicodeEncodeError: 'charmap' codec can't encode characters in position 263607-263621: character maps to

In pyvis, Why I get this error when I am trying to visualise a simple graph (3 lines of codes only)? net=Network(notebook=True, cdn_resources='in_line') net.from_nx(nx.davis_southern_women_graph()) net.show('example.html') This leads to the…
Traveling Salesman
  • 2,209
  • 11
  • 46
  • 83
2
votes
1 answer

How to display node attributes on a networkx graph visualized with pyvis?

I would like to display node attributes when visualized with pyvis. import networkx import obonet G = obonet.read_obo('https://ftp.ebi.ac.uk/pub/databases/chebi/ontology/chebi_core.obo') # Create smaller subgraph H = nx.ego_graph(G, 'CHEBI:36464',…
Soerendip
  • 7,684
  • 15
  • 61
  • 128
1
2 3 4 5 6 7