GraphStream - A Dynamic Graph Library

SourceForge.net Logo

Overview - What is GraphStream?

GraphStream is a java library that manages dynamic graphs. It is composed of an object oriented API that gives an easy and quick way to add edges and nodes in a graph and make them evolve.

Dynamic Graphs

The graphs we address are composed of sets of nodes and edges that can appear, disappear or be modified and are called events. When such events occur in a graph, they define its evolution. In this way we define dynamics in a graph to be not only changes in its elements states but also elements creation and removals.

I/0 streams

The sequence of events that occur in a graph is seen as a stream; an input stream of events that continuously changes the graph. This stream can be initiated from another application or read from a file. The graph is seen as a client or a consumer for such events. It listens to producers for input streams of events. Since a graph is modified by events, it can be initially constructed with it. At any time of its life, a graph can generate an output stream of events that define its state. In this scene, the graph is the producer and the listener can be another application or be stored in a file.

A dedicated package (org.miv.graphstream.io) of the library offers such input and output streams. More information can be found in the documentation.

Graphical User Interface

The aim of the project is not only to provide an easy and rapid way to manage dynamic graphs but also give the experienced user access to an efficient set of tools. In other words, if you do not want to deal with graphical interfaces, you can instantiate in one line of code a default viewer that will display your graph on a Swing window. If you want a more precise graphical interface, you will notice that the library provides tools to layout (arrange) a graph and to display it. Each of these tools is configurable.

Publications

Please cite this work in your publications if you intend to use GraphStream.

Antoine Dutot, Frédéric Guinand, Damien Olivier, and Yoann Pigné. Graphstream: A tool for bridging the gap between complex systems and dynamic graphs. In EPNACS: Emergent Properties in Natural and Artificial Complex Systems, 2007. [bib] [pdf]

GraphStream Logo
(The source code that generates this display)

An example of graph rendering with GraphStream.
An example of an application using GraphStream (community detection with AntCo² on the "dolphin" network (D. Lusseau, K. Schneider, O. J. Boisseau, P. Haase, E. Slooten, and S. M. Dawson, Behavioral Ecology and Sociobiology 54, 396-405, 2003)). A style sheet is used to specify the look of edges and nodes. The large translucent circles centered on edges are called "sprites". This is one of the mechanisms used by GraphStream to visually represent the data associated to edges or nodes.

A graph extracted from the Amazon.com site
(download the SVG file or the DGS file)

An example of a graph produced using the AmazonCrawler external GraphStream module (actually only on SVN, you can get it using "svn co https://graphstream.svn.sourceforge.net/svnroot/graphstream/GraphStreamAmazon/trunk AmazonCrawler"). This module explores the Amazon.com database starting from a given product. This product becomes a node of the graph. Then the products advertised as similar by Amazon (customers that bought X also bought Y) are explored, represented as nodes and edges are added between them. This process is repeated recursively until a given depth limit. The example above starts from the book "The Art Of Computer Programming" by Donald E. Knuth. Under is a larger example from the same starting book :
A graph extracted from the Amazon.com site
(download the SVG file or the DGS file)

Two spanning trees on a mobile ad-hoc network
(download the SVG file or the DGS file)

Two spanning trees on mobile ad-hoc network.

css xhtml analytics