I just started programming in Python a couple of weeks ago, but I’m already in love with it. Here’s a taste of the new Python API included with the latest release of UbiGraph. It is such an easy, expressive language!
U = ubigraph.Ubigraph()
x = U.newVertex(shape="sphere", color="#ffff00")
smallRed = U.newVertexStyle(shape="sphere", color="#ff0000", size="0.2")
previous_r = None
for i in range(0,10):
r = U.newVertex(style=smallRed, label=str(i))
if previous_r != None:
previous_r = r
This is really a two-for-one release, as alpha-0.2.2 was a stealth fizzle due to build problems (now solved). We now support 8 linux platforms, and both Intel and PowerPC Mac OS X 10.4+. There are subtantially fewer dynamic library dependencies. We’re confident we can build for pretty much any flavour of linux now, so if you can’t get one of the versions to work, let us know (email@example.com).
Lots of new features since the last (announced) release: a nifty Python API that will be fun to play with (see the Quick Start), XMLRPC client callbacks when a vertex is double-clicked, arrows, autozoom, fullscreen mode, oriented edges, toggling labels, better documentation and lots of new examples. It’s faster and more stable. And there’s a nice Ruby API contributed by mootoh.
Version alpha-0.2.3, 29 May 2008
* Better Python API: examples/Python/ubigraph_example.py
* Reduced dependency on shared libraries
Version alpha-0.2.2, 28 May 2008
* XMLRPC callbacks on left double-click; see Python/callback.py
* New platforms supported: Mac OS X PowerPC, Ubuntu 6.06
* arrowheads are back (will be more customizable in future)
* New API methods: new_vertex_style_w_id(s,parent) and
* Performance and numeric-stability improvements
* Fullscreen mode (right-mouse button menu)
* Autozoom (disable via right-mouse button menu if it annoys)
* Toggle labels: right-mouse button menu, or press ‘l’ or ‘L’
* Added ‘oriented’ attribute for edges: see e.g. Python/tree.py
* New example: Python/multiedge.py
* Ruby interface (rubigraph) by mootoh
* Higher rate of XMLRPC requests processed without reducing the framerate
* Improved error reporting; use ubigraph_server -quiet to suppress warnings
* Brought C API up to date
* API now guarantees that generated id’s are in the range 0×40000000-0×7fffffff.
* Bug fix: jittery vertices caused by threading issues
* Bug fix: colors with uppercase hex digits
* Bug fix: segfault due to non-threadsafe code on big graphs (#768202)
* Bug fix: style changes that affect layout now exit idle mode
The next version of ubigraph has client callbacks via XMLRPC. Here’s a demo of browsing the link structure of planetmath.org. Left double-clicks result in a callback to the python client, which grabs the page from the web, extracts its links, and updates the graph.
Florent Bouchez, a PhD student at ENS Lyon, has posted some splendid animations of register colouring and coalescing algorithms he is working on. I especially like the coalescing movie. (Note: the version of quicktime on my computer doesn’t recognize the codec, I had to use VLC.)