MCPcopy Index your code
hub / github.com/fabilab/iplotx

github.com/fabilab/iplotx @1.8.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.8.0 ↗ · + Follow
646 symbols 2,040 edges 164 files 271 documented · 42%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Github Actions PyPI - Version RTD Coverage Status pylint DOI

iplotx

Banner.

Visualise networks and trees in Python, with style.

Supports: - networks: - networkx - igraph - graph-tool - zero-dependency - trees: - ETE4 - cogent3 - phyloframe - Biopython - scikit-bio - dendropy - zero-dependency

In addition to the above, any network or tree analysis library can register an entry point to gain compatibility with iplotx with no intervention from our side.

Installation

pip install iplotx

Quick Start

import networkx as nx
import matplotlib.pyplot as plt
import iplotx as ipx

g = nx.Graph([(0, 1), (1, 2), (2, 3), (3, 4), (4, 0)])
layout = nx.layout.circular_layout(g)
ipx.plot(g, layout)

Quick start image

Documentation

See documentation and gallery.

Citation

If you use iplotx for publication figures, please cite:

F. Zanini. A universal tool for visualisation of networks and trees in Python. F1000Research 2025, 14:1377. https://doi.org/10.12688/f1000research.173131.1

Features

  • Plot networks from multiple libraries including networkx, igraph and graph-tool, using Matplotlib. ✅
  • Plot trees from multiple libraries such as cogent3, ETE4, phyloframe, skbio, biopython, and dendropy. ✅
  • Flexible yet easy styling, including an internal library of styles ✅
  • Interactive plotting, e.g. zooming and panning after the plot is created. ✅
  • Store the plot to disk in many formats (SVG, PNG, PDF, GIF, etc.). ✅
  • 3D network visualisation with depth shading. ✅
  • Efficient plotting of large graphs (up to ~1 million nodes on a laptop). ✅
  • Edit plotting elements after the plot is created, e.g. changing node colors, labels, etc. ✅
  • Animations, e.g. showing the evolution of a network over time. ✅
  • Mouse and keyboard interaction, e.g. hovering over nodes/edges to get information about them. ✅
  • Node clustering and covers, e.g. showing communities in a network. ✅
  • Edge tension, edge waypoints, and edge ports. ✅
  • Choice of tree layouts and orientations. ✅
  • Tree-specific options: cascades, subtree styling, split edges, etc. ✅
  • (WIP) Support uni- and bi-directional communication between graph object and plot object.🏗️

Authors

Fabio Zanini (https://fabilab.org)

Core symbols most depended-on inside this repo

get_style
called by 26
iplotx/style/__init__.py
get_edges
called by 22
iplotx/tree/__init__.py
get_vertices
called by 16
iplotx/tree/__init__.py
get_layout
called by 15
iplotx/tree/__init__.py
get_style
called by 13
iplotx/vertex.py
get_layout
called by 11
iplotx/vertex.py
rotate_style
called by 10
iplotx/style/__init__.py
_get_shorter_edge_coords
called by 10
iplotx/edge/geometry.py

Shape

Method 320
Function 289
Class 37

Languages

Python100%

Modules by API surface

tests/test_vertex.py33 symbols
iplotx/tree/__init__.py30 symbols
iplotx/edge/__init__.py30 symbols
iplotx/vertex.py28 symbols
iplotx/ingest/typing.py25 symbols
tests/test_geometry.py22 symbols
iplotx/network/__init__.py22 symbols
tests/test_igraph.py20 symbols
tests/test_biopython.py20 symbols
tests/test_dendropy.py19 symbols
iplotx/label.py18 symbols
tests/test_simple_network_provider.py15 symbols

For agents

$ claude mcp add iplotx \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact