VAGRANT - VA Graphing/Analysis Toolkit

VAGRANT is a class written in PHP 4 for creating graphs and charts.

Currently, the class supports generation of the following graphs:

as well as the following charts: Download VAGRANT

VAGRANT 2.5 In Development - 11/29/2001

Recentently I have been working on version 2.5 of VAGRANT. What happened to
version 2 you ask? Well, after coding for a while, I came to the realization
that magic numbers were bad. I like the idea of a simple method of getting and
setting variables in the graph/chart objects through the vagrant object and
decided to base the core classes around that principle. Now, everything is
adjustable. Fonts faces, font sizes, colors, backgrounds, alpha values... As an
example of the new code (So far line, dashed line, bar and filled graphs work),
I created a fairly busy image to showoff the new potential. Bear in mind that
data is added to the vagrant core object and shared among the various graphing
objects. The example image shows 3 sets of data one of which being used in the
top and bottom graph. Also, I made the legends movable objects that can be
placed anywhere in the image, not necessarily on the image it represents.

VAGRANT 1.1 Release - 06/21/2001

With the new release of VAGRANT I thought it best to change the images on the
homepage to better reflect the capabilities. Click on any of the images to take
you to the example section that includes the code that generated the image and a
larger graph.

Note (08/23/2001): I have added support for highlighted regions in graphs. Check out filled line graph sample to see it in action.

Filled Line Graphs: Various Line Graphs:

Pie Chart:


VAGRANT 2.5 is in development and in CVS. Currently it only supports graphs (no charts) but the graph portion is fairly feature complete. One thing that is different is the inability to graph one set of data multiple times in the same graph (say if you wanted lines and dots). Scatter graphs should be coming soon and then I will get to work on charts. Hopefully I can make the pie charts a little more intelligent in terms of showing pie labels... Also, I'd like to give a word of thanks to people who have contributed to VAGRANT (all versions) with code, ideas and support:
Rasterman, Rasmus, Chorizo, Ghylk, James Byers
Benjamin Adler, Sebastian Bergmann, and the php_imlib folks

The source files that you can view make similar graphs but not necessarily the graphs being displayed. This is because the images are using the PNG module which at this time, is not accesible on this server (To my knowledge).

I changed the class structure to have a generic graphing class that is responsible for the graphing logic and creation and image library specific files. The following images are updated images using the imlib2 (thanks to Rasterman and Mandrake and other imlib authors) php module written by Matt McClanahan, Steve Langasek available at The dynamic scripts linked on this page are not using the updated files yet but that should happen soon. Lastly, the chart stuff has not been changed at all but I hope to update that to the same style as the VAGRANT.class file.

I wanted to integrate an imlib version of VAGRANT for the alpha blending. Graphs that overlap can be very difficult to view if they are solid colors so this seemed like a natural extension to a graphing class. As for the 3D pie charts, gratuitous but cool...

Back to project page.
VAGRANT code has been released under the GPL