Home || SourceForge.net Project Page

Note: This is taken from the original mfGraph page at RealMike's Programming Resources. The text explains my motivation when I started developing mfGraph back in 2003. Since then, my plans for mfGraph have changed somewhat. See the more recent text "About mfGraph Library".

Furthermore, claims I make about shortcomings in Microsoft products might not be true anymore for the current product versions. ;-)


The Story Behind

For a long time, I have been looking for a cheap and easy way to draw graphs. Often, in software design or when you're writing documentation, a graph says more than a thousand words1. Drawing simple graphs on a flipchart or on a whiteboard is easy. Reproducing these drawings in Word documents is hard. Word has not the slightest notion of nodes and edges; when you move a node, the "connected" edges stay where they are2.

Commercial solutions exist, but they all have their problems:

A GUI-only solution is also not optimal. Using an API or a command-line interface, one should be able to extend one's own programs with graph-drawing capabilities. For example, Doxygen, a popular documentation generator, uses a command-line utility to layout include graphs and inheritance diagrams. The tool that Doxygen uses is DOT from the GraphViz package.

GraphViz is an open-source graph layouting toolkit, developed and maintained by AT&T Research Labs. The command-line utilities take as input a graph description in the custom DOT language and calculate a visually pleasing layout. Supported output formats include JPEG, PNG, PostScript, and many others. For example, this graph description,

converted by DOT using the command-line

results in the following graph:

Nodes, edges, and subgraphs can have associated attributes to colorize nodes and edges, to apply multi-line labels, to change node shapes, etc. Using the abstract DOT language, graphs of arbitrary complexity can be created in a matter of minutes. Although command-line based, this is easier, faster, and more convenient than what GUI-only solutions could offer.

Note: The GraphViz homepage contains a gallery that really shows off the capabilities of the toolkit.

mfGraph Benefits

The mfGraph Library consists of the following components:

A sample application is included that demonstrates how the mfGraph Library can be put to good use in a real-world application.

The mfGraph Library is distributed under the terms of the GNU Lesser General Public License, so that it can be used in non-free software. The mfGraph UI Sample Application is distributed under the terms of the GNU General Public License.

The Future of mfGraph

My current focus is on integrating mfGraph into wxPython GUI applications. Just like the standard class wxHtmlWindow encapsulates the display of HTML pages, there should once be a class wxMfgraphWindow that displays DOT graphs and that handles all user interaction with the graph. (For Borland C++Builder, a similar visual component is already part of the distribution package.)

Other Software of Interest

  1. At least, you can draw a graph in a tenth of the time it takes to write a thousand words. (1)

  2. Of course, this is also true for flipcharts. This is why we need software support in the first place. (2)

TheStoryBehindMfgraph (last edited 2008-10-31 15:44:14 by localhost)


Copyright © 2003-2009 [WWW] Michael Fötsch. Visit [WWW] RealMike's Programming Resources.