Skip to main content

Graph editor for Jupyter

Project description

Interactive Graph Editor for Jupyter

An interactive graph editor function designed for Jupyter notebooks. edit(graph: nx.Graph) function allows users
to manipulate a graph by creating vertices, edges, and adding labels directly within a Jupyter environment.

Parameters

  • graph (networkx.Graph): The graph object to be edited. It should be an instance of the NetworkX Graph class or a subclass.

Functions of buttons (from left to right)

  1. Select whether you want to edit graph structure.
  2. Select whether you want to edit labels.
  3. Toggle nodes clickable option.
  4. Toggle edges clickable option.
  5. Close editing window.

Mouse Functions

  1. Click and drag vertices to move them around the canvas.
  2. To create an edge, click on one vertex and then click on another vertex.
    An edge will be created between the two selected vertices.
  3. To create a vertex, click on empty space of a canvas.
  4. To delete an object, double-click on it.

Dependencies

  • Jupyter notebook web environment.
  • NetworkX library for graph manipulation.

Notes

This function relies on Jupyter ipywidgets, so it should work only in web versions of Jupyter.

Examples

import networkx as nx

# Create a sample graph
G = nx.Graph()
G.add_nodes_from([1, 2, 3])
G.add_edges_from([(1, 2), (2, 3)])

# Call the interactive graph editor
edit(G)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygraphedit-0.0.4.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygraphedit-0.0.4-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file pygraphedit-0.0.4.tar.gz.

File metadata

  • Download URL: pygraphedit-0.0.4.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for pygraphedit-0.0.4.tar.gz
Algorithm Hash digest
SHA256 7249091cc8d999bdeef4cdd7de01f79273e122383f2ba65275029b0cfb3e44e1
MD5 b10f8b82483f7b15b36d07ff38b452a7
BLAKE2b-256 bb0e84b118af262d72b9da0e85d14b0a6c4722abd0d4342fa1b9e0f6bd4f2854

See more details on using hashes here.

File details

Details for the file pygraphedit-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pygraphedit-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for pygraphedit-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 497a7e6ee8c8f145a3622c36b3d91c888193da440af0e8d494de15a625966cee
MD5 ebbae30e64b4950c8f0c39634f9c7d2a
BLAKE2b-256 cfa9e9ed1495fe748a6904aeed96ef196a6aeb1f69ffb1ea97c5f19ee5ca6259

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page