Here are some benchmark results for Ubuntu 64-bit 8.04:
| Version | Wall time to construct 10×10x10 cube graph (3701 API calls) | API calls per second |
|---|---|---|
| Python (xmlrpclib), 1 CPU | 6.2 s | 600 |
| Python (xmlrpclib), 2 CPUs | 3.5 s | 1060 |
| C API (xmlrpc-c), 1 CPU | 2.3 s | 1600 |
| C API (xmlrpc-c), 2 CPUs | 2.1 s | 1700 |
| Direct linking with UbiGraph server (not possible with the free version) |
0.004 s | 925000 |
The interface is now included in NetworkX. To see the UbiGraph demos, do this:
$ svn co https://networkx.lanl.gov/svn/networkx/trunk networkx $ cd networkx $ python setup.py install $ cd doc/examples/ubigraph $ python atlas.py
(Tip: you’ll need a more recent version of Python than 2.3.5, the default version that comes with Mac OS X 10.4.)
]]>Note: video doesn’t start until 0:12.
]]>
]]>
import ubigraph
U = ubigraph.Ubigraph()
U.clear()
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))
U.newEdge(x,r,arrow=True)
if previous_r != None:
U.newEdge(r,previous_r,spline=True,stroke="dashed")
previous_r = r
]]>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
and Python/callback_webcrawler.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
new_edge_style_w_id(s,parent)
* 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
