A haskell wrap for Ubigraph http://ooxo.org/hubigraph/
|Latest on Hackage:||0.3.2|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
a Haskell wrap for Ubigraph (http://www.ubietylab.net/ubigraph)
It provides a shortcut to draw a graph in ubigraph (by calling XML-RPC internally.)
Make sure Ubigraph server is started before using this library.
import Graphics.Ubigraph u x = initHubigraph "http://localhost:20738/RPC2" >>= runHubigraph x main = u $ mkRing 10 mkRing n = do mapM_ (newVertexWithID) [0..(n-1)] mapM_ (newEdge') [0..(n-1)] sid <- newVStyle 0 setVStyleAttr (VColor "#ff0000") sid setVStyleAttr (VShape Sphere) sid mapM_ (changeVStyle sid) [0..(n-1)] where newEdge' e = newEdge (e, (e+1) `mod` n)
$ cabal install hubigraph
The BSD3 License