Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Graph Library [closed]

Tags:

python

graph

I'm writing a python application that will make heavy use of a graph data structure. Nothing horribly complex, but I'm thinking some sort of graph/graph-algorithms library would help me out. I've googled around, but I don't find anything that particularly leaps out at me.

Anyone have any good recommendations?

like image 958
cpatrick Avatar asked Mar 03 '09 14:03

cpatrick


People also ask

What is the best plotting library for Python?

matplotlib. matplotlib is the O.G. of Python data visualization libraries. Despite being over a decade old, it's still the most widely used library for plotting in the Python community.

Is there a graph module in Python?

python-graph (dist: python-graph-core, mod: pygraph) is a library for working with graphs in Python. This software provides a suitable data structure for representing graphs and a whole set of important algorithms. (Last commit in 2018, no issue page)

What package does Python draw a graph?

1. Matplotlib. Matplotlib is the most popular data visualization library of Python and is a 2D plotting library.

What is Pygraph in Python?

A graph manipulation library in pure Python. Available on PyPI. Pygraph aims to be an easy-to-use and functional graph library that doesn't sacrifice advanced capabilities or usability in the process.


7 Answers

There are two excellent choices:

NetworkX

and

igraph

I like NetworkX, but I read good things about igraph as well. I routinely use NetworkX with graphs with 1 million nodes with no problem (it's about double the overhead of a dict of size V + E)

If you want a feature comparison, see this from the Networkx-discuss list

Feature comparison thread

like image 75
Gregg Lind Avatar answered Sep 30 '22 05:09

Gregg Lind


I would like to plug my own graph python library: graph-tool.

It is very fast, since it is implemented in C++ with the Boost Graph Library, and it contains lots of algorithms and extensive documentation.

like image 43
Tiago Peixoto Avatar answered Sep 30 '22 03:09

Tiago Peixoto


Have you looked at python-graph? I haven't used it myself, but the project page looks promising.

like image 28
zweiterlinde Avatar answered Sep 30 '22 03:09

zweiterlinde


Also, you might want to take a look at NetworkX

like image 38
lmount Avatar answered Sep 30 '22 05:09

lmount


Use the Boost Graph Library - Python Bindings.

like image 33
Frank Avatar answered Sep 30 '22 03:09

Frank


Take a look at this page on implementing graphs in python.

You could also take a look at pygraphlib on sourceforge.

like image 20
Brian R. Bondy Avatar answered Sep 30 '22 05:09

Brian R. Bondy


I'm having the most luck with pydot. Some of the others are hard to install and configure on different platforms like Win 7.

http://code.google.com/p/pydot/

like image 33
syvex Avatar answered Sep 30 '22 05:09

syvex