Skip to main content

yFiles Graphs for Jupyter logo

PyPI - Version PyPI - Downloads Docs - Latest Python Versions License

Using Neo4j, Kuzu, or SPARQL? Use our dedicated integrations instead: Neo4j · Kuzu · SPARQL

A graph visualization widget for Jupyter Notebook and JupyterLab powered by yFiles for HTML.

Visualize graphs from many sources out of the box:

Many more formats are supported via NetworkX imports.

yFiles Graphs for Jupyter

Try the showcase notebook in Colab: https://colab.research.google.com/github/yWorks/yfiles-jupyter-graphs/blob/main/examples/feature-releases/showcase.ipynb


Key Features

  • Fast, production-grade graph rendering (yFiles engine)
  • Multiple automatic layouts (hierarchical, organic, circular, ...)
  • Data-driven styling (colors, sizes, labels, ...) from node/edge attributes
  • Sidebars for search, data inspection, and neighborhood exploration
  • Heatmaps and map visualization

Choose your path

There are extensions built on top of yfiles-jupyter-graphs that provide tailored APIs and convenient data mapping for their respective ecosystems:

Otherwise, continue below with yfiles-jupyter-graphs.

Where it runs

AI Coding Assistant

Working with an AI coding agent? Our agent guide contains instructions and best practices for coding agents.

Example start prompt:

Read the instructions at https://raw.githubusercontent.com/yWorks/yfiles-jupyter-graphs/refs/heads/main/agent-guide.md. Then, create a new Jupyter notebook that step-by-step explores the and visualizes it using yfiles-jupyter-graphs. Be creative and design visualizations that highlight interesting insights and aspects of the data.


Install

Prerequisites:

pip install yfiles-jupyter-graphs

Important: When installing from inside a notebook, prefer %pip install yfiles-jupyter-graphs over !pip install to ensure the package is installed into the running kernel’s environment.

Docker (optional)

If you want to start with a clean Jupyter environment that has the widget preinstalled:

mkdir yfiles-jupyter && cd yfiles-jupyter
echo -e "FROM jupyter/scipy-notebook\nRUN pip install yfiles-jupyter-graphs" > Dockerfile
docker build -t yfiles-jupyter-graphs-on-docker .
docker run -it -p 8888:8888 --name yfiles-jupyter yfiles-jupyter-graphs-on-docker

This approach has been verified with scipy-notebook:lab-3.4.7 and yfiles-jupyter-graphs==1.2.1. If you encounter issues with a newer image, please open an issue.

Quickstart

Display a simple graph:

from yfiles_jupyter_graphs import GraphWidget, Node, Edge
w = GraphWidget(
    nodes=[
        Node(id=0, properties={"firstName": "Alpha", "label": "Person A"}),
        Node(id=1, properties={"firstName": "Bravo", "label": "Person B"}),
        Node(id=2, properties={"firstName": "Charlie", "label": "Person C", "has_hat": False}),
        Node(id=3, properties={"firstName": "Delta", "label": "Person D", "likes_pizza": True})
    ],
    edges=[
        Edge(start=0, end=1, properties={"since": "1992", "label": "knows"}),
        Edge(start=1, end=3, properties={"label": "knows", "since": "1992"}),
        Edge(start=2, end=3, properties={"label": "knows", "since": "1992"}),
        Edge(start=0, end=2, properties={"label": "knows", "since": 234})
    ],
    directed=True
)
display(w)

Use the toolbar and sidebar to inspect data, search graph, explore neighborhood and change layouts.

Next steps

Feature Gallery

neighborhood sidebar See Node Neighborhood
Open In Colab
layouts Choose Graph Layout
Open In Colab
data sidebar Investigate Nodes or Edges Data
Open In Colab
search sidebar Search for Nodes or Edges
Open In Colab
importer Import Graph Data
Open In Colab
element color mapping Make Data Dependent Property Changes
Open In Colab
heat mapping Define a Heatmap Background
Open In Colab
leaflet mapping Use a Map Background
Open In Colab
nested graph Visualize nested data
Open In Colab

Documentation

Code of Conduct

This project is governed by the Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to contact@yworks.com.

Feedback

This widget is by no means perfect. If you find something is not working as expected we are glad to receive an issue report from you. Please make sure to search for existing issues first and check if the issue is not an unsupported feature or known issue. If you did not find anything related, report a new issue with necessary information. Please also provide a clear and descriptive title and stick to the issue templates. See issues.

License

See LICENSE.md for license information.

Dependencies

Release files for yfiles-jupyter-graphs 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yfiles-jupyter-graphs 2.0.0
File Size Uploaded
yfiles_jupyter_graphs-2.0.0.tar.gz 13.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for yfiles-jupyter-graphs 2.0.0
File Interpreter ABI Platform
yfiles_jupyter_graphs-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size:29.4 MB

Release files / yfiles_jupyter_graphs-2.0.0.tar.gz

Download URL yfiles_jupyter_graphs-2.0.0.tar.gz
Size 13.0 MB
Tags Source
SHA-256 checksum
How to use checksums
94b845c41060169b5c9e6a7eee8735610bfce17aa09e36bf25dd1f366df19f7f
BLAKE2b-256 checksum
How to use checksums
2ca33184b145ed84a107b4adb99673c4a864177244a15bb334b3f247c573f52c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / yfiles_jupyter_graphs-2.0.0-py3-none-any.whl

Download URL yfiles_jupyter_graphs-2.0.0-py3-none-any.whl
Size 16.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
dd49b25e267d2ea212a597a0f9042a4829e72a6d5b02e27bbe22054847daf63b
BLAKE2b-256 checksum
How to use checksums
0dc4583f94de7024d2a092491d0eadcd5cecf4db7f3aa4076428d65a00ad0ce1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.10.9

2 release files

1.10.8

2 release files

1.10.7

2 release files

1.10.6

2 release files

1.10.5

2 release files

1.10.4

2 release files

1.10.3

2 release files

1.10.1

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.3

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.8

2 release files

1.4.7

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page