HOSTING

Share a pyvis or NetworkX graph as a link

pyvis turns a NetworkX graph into an interactive HTML page. Save it as one self-contained file, upload it, and send a link that opens the graph, with dragging, zoom and hover labels, in any browser.

4 min read·

A network graph is hard to read as a screenshot: the point is to drag nodes apart, zoom into a cluster and hover for labels. pyvis writes that interactive view to an HTML file. The file is easy to open on your own machine and easy to break when you send it, because by default it depends on a folder sitting next to it. For charts rather than graphs, see sharing a Bokeh or Altair chart.

Save the graph as one file

  • ✓Create the network with the JavaScript inside the file: net = Network(height="750px", width="100%", cdn_resources="in_line").
  • ✓Load a NetworkX graph with net.from_nx(G), or add nodes and edges with net.add_node and net.add_edge.
  • ✓Write it with net.write_html("graph.html"). net.show("graph.html") also writes the file and opens it.
  • ✓cdn_resources="remote" is the smaller alternative: the file loads vis-network from a public CDN and needs an internet connection to display.

Why an uploaded pyvis file shows a blank page

With the default cdn_resources="local", pyvis writes a lib folder beside graph.html and the page loads its scripts from that folder. Upload graph.html on its own and those scripts are missing, so the page loads with no graph. Regenerate the file with "in_line" or "remote" and upload it again. Other causes of a page that works locally and breaks once hosted are covered in why an AI-built page breaks when hosted.

What works in a static file

Everything pyvis draws runs in the browser: dragging nodes, zoom and pan, hover text from each node’s title, edge labels, colours and sizes, and the physics layout. net.show_buttons(filter_=["physics"]) adds a settings panel that also works once hosted.

Large graphs can be slow to settle because the browser runs the physics simulation on load. For a few thousand nodes, net.toggle_physics(False) after setting positions, or a faster solver such as net.barnes_hut(), keeps the page responsive.

Upload it and send the link

Drag graph.html onto the FileShare Pro dashboard and copy the link. The free plan accepts files up to 100 MB, which covers a large graph with the library embedded.

Viewers need no account and nothing to install. Shared pages carry a noindex tag, so a graph of internal data does not appear in search results. On Pro you can add a password: password-protecting an HTML page.

Update the graph without a new link

When the data changes, regenerate the file and upload it over the old one. The link stays the same and the previous version is kept in history: updating a shared link without changing it.

Turn on comments and readers can leave a note on the page after typing a name, such as a missing connection or a node that looks wrong. The view count shows whether the person you sent it to has opened it.

Frequently asked

How do I share a NetworkX graph with someone who does not use Python?

Convert it with pyvis: net.from_nx(G), then net.write_html("graph.html") with cdn_resources="in_line". Upload the file and send the link. It opens in any browser.

Why is my pyvis graph blank after uploading?

The file was saved with the default cdn_resources="local" and expects a lib folder next to it. Save it again with cdn_resources="in_line" or "remote".

Can people drag the nodes on the shared link?

Yes. Dragging, zoom, pan and hover labels run in the browser and work the same as when you open the file locally.

Does the graph work offline?

With cdn_resources="in_line", yes: the vis-network library is inside the file. With "remote", it needs an internet connection.

Is it free?

Yes. The free plan hosts up to 50 files of up to 100 MB each, with view counts and comments included. Password-protected links are on Pro.

Got a page to share?

Drop the file, copy the link — live in seconds, free plan included.

Start sharing free