Python graph visualization libraries

Updated Nov 2026

Python graph visualization libraries draw networks of nodes and edges as images, documents, or interactive web pages. A layout engine places the nodes so that edges cross as little as possible before a renderer draws the result. These libraries let developers and AI agents show dependency graphs, knowledge graphs, and system architectures.

Popularity

NetworkX has the most monthly downloads in this comparison, at 279.1M, a count that covers all its graph analysis.

LibraryMonthly downloadsStarsLast releaseLicense
NetworkX
279.1M
17.4KSep 2026BSD-3-Clause
graphviz
38.3M
1.8KJun 2025MIT
pydot
20.4M
1.0KJun 2025MIT
rustworkx
7.5M
1.8KJul 2026Apache-2.0
Bokeh
6.5M
20.5KNov 2026BSD-3-Clause
igraph
4.3M
1.5KOct 2025GPL-2.0
pyvis
2.0M
1.2KFeb 2023BSD-3-Clause
Diagrams
801.6K
42.8KNov 2025MIT
Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

Creates and manipulates graphs and networks.

Downloads / mo
279.1M
Stars
17.4K
Last release
3.7
License
BSD-3-Clause

Quickstart

From drawing.html
$ pip install networkx matplotlib
import networkx as nx
import matplotlib.pyplot as plt
graph = nx.path_graph(3)
nx.draw_networkx(graph)
plt.show()

NetworkX examples

From open-source projects on GitHub

Creates DOT graph descriptions and renders them through Graphviz.

Downloads / mo
38.3M
Stars
1.8K
Last release
0.21
License
MIT

Strengths

  • Renders diagrams in multiple formats. Generate PDF, PNG, or SVG through the installed Graphviz renderer.
  • Styles nodes and edges. Set graph defaults or customize individual nodes and connections.

Limitations

  • Needs a separate Graphviz installation. Install Graphviz and make its dot executable available on PATH.
  • Labels interpret special text. Use graphviz.escape when arbitrary text must appear literally.

Quickstart

From fsm.py
$ pip install graphviz
from graphviz import Digraph
graph = Digraph()
graph.edge('a', 'b')
graph.render('graph', format='svg', cleanup=True)

graphviz examples

From open-source projects on GitHub

Creates, reads, edits, and visualizes DOT graphs from Python.

Downloads / mo
20.4M
Stars
1.0K
Last release
4.0.1
License
MIT

Strengths

  • Reads and edits DOT graphs. Parse an existing DOT string before changing graph objects.
  • Converts NetworkX graphs. Use NetworkX conversion methods to move between the graph representations.

Limitations

  • Needs Graphviz for image rendering. Install Graphviz separately to generate rendered graph images.
  • Debug logging includes graph contents. DEBUG logs can include processed graph contents and DOT strings.

Quickstart

From README.md
$ pip install pydot
import pydot
graph = pydot.Dot(graph_type='digraph')
graph.add_edge(pydot.Edge('a', 'b'))
graph.write_svg('graph.svg')

Provides a high-performance graph library for Python.

Downloads / mo
7.5M
Stars
1.8K
Last release
0.18.1
License
Apache-2.0
$ pip install rustworkx matplotlib
import rustworkx as rx
from rustworkx.visualization import mpl_draw
import matplotlib.pyplot as plt
graph = rx.PyDiGraph()
graph.extend_from_edge_list([(0, 1)])
mpl_draw(graph)
plt.show()

rustworkx examples

From open-source projects on GitHub

Draws interactive plots and applications in the browser from Python.

Downloads / mo
6.5M
Stars
20.5K
Last release
3.10.2
License
BSD-3-Clause

Quickstart

From graph.html
$ pip install bokeh networkx
import networkx as nx
from bokeh.plotting import figure, from_networkx
from bokeh.io import output_file, save
plot = figure()
plot.renderers.append(from_networkx(nx.path_graph(3), nx.spring_layout, seed=1))
output_file('graph.html')
save(plot)

Bokeh examples

From open-source projects on GitHub

Provides high-performance graph data structures and algorithms.

Downloads / mo
4.3M
Stars
1.5K
Last release
1.0.0
License
GPL-2.0

Quickstart

From visualisation.html
$ pip install igraph matplotlib
import igraph as ig
import matplotlib.pyplot as plt
graph = ig.Graph([(0, 1)], directed=True)
fig, ax = plt.subplots()
ig.plot(graph, target=ax)
plt.show()

igraph examples

From open-source projects on GitHub

Creates interactive network visualizations as HTML.

Downloads / mo
2.0M
Stars
1.2K
Last release
0.3.2
License
BSD-3-Clause

Strengths

  • Exports interactive HTML graphs. Share the generated visualization as an HTML file.
  • Imports NetworkX node attributes. Convert an existing graph while retaining supported visualization properties.

Limitations

  • Collapses repeated undirected edges. Repeated connections between the same undirected nodes produce one edge.
  • Node IDs must be strings or integers. Pass a string or integer as each node ID.

Quickstart

From example.ipynb
$ pip install pyvis
from pyvis.network import Network
net = Network(notebook=False, cdn_resources='in_line')
net.add_node(0)
net.add_node(1)
net.add_edge(0, 1)
net.write_html('graph.html', notebook=False, open_browser=False)

pyvis examples

From open-source projects on GitHub

Draws diagrams as code.

Downloads / mo
801.6K
Stars
42.8K
Last release
0.25.1
License
MIT

Quickstart

From installation.md
$ pip install diagrams
from diagrams import Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB

with Diagram('Web Service', show=False):
    ELB('lb') >> EC2('web') >> RDS('userdb')

Diagrams examples

From open-source projects on GitHub

FAQ

graphviz suits static diagrams laid out by the Graphviz engines. pyvis suits interactive network views in an HTML page. Diagrams suits cloud architecture diagrams written as code.

pyvis creates interactive network visualizations as HTML pages, with the JavaScript resources inline or loaded from a CDN.

The graphviz package builds DOT source from Python and renders it through the Graphviz layout engines installed on the system. pydot also parses existing DOT files.

Diagrams draws architecture diagrams as code from nodes, edges, and optional icon sets for cloud services.

NetworkX includes drawing helpers that use Matplotlib or Graphviz. Its own guide warns that drawing may move to an add-on package.

For coding agents

Found your graph visualization library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official