Kazuharu Arakawa > Ubigraph-0.05 > Ubigraph

Download:
Ubigraph-0.05.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.05   Source  

NAME ^

Ubigraph - Perl client of Ubigraph software

SYNOPSIS ^

    use Ubigraph;

    my $u = new Ubigraph();

    my $v1 = $u->Vertex();
    my $v2 = $u->Vertex(shape=>"sphere");

    my $e1 = $u->Edge($v1, $v2);

    $v1->shape("torus");
    $v1->size(3.5);

    sleep(2);

    $u->clear();

    my @v;
    for (0..100){
        $v[$_] = $u->Vertex();
    }

    for (0..100){
        $u->Edge($v[int(rand(100))], $v[int(rand(100))]);
        select(undef, undef, undef, 0.05);
    }

DESCRIPTION ^

Ubigraph is a Perl client interface for the UbiGraph software (http://ubietylab.net/ubigraph/) with object-oriented abstraction over the XML-RPC calls. UbiGraph is a client-server software for 3D visualization and layout of graph-theoretical network diagrams. This module hides the XML-RPC calls and allows visualization through object-oriented access to Vertex and Edge objects, similar to Python and Ruby APIs.

EXPORT

None by default.

Ubigraph class ^

$u = new Ubigraph()
$u = new Ubigraph($url)

The constructor of Ubigraph class starts the XML::RPC binding to Ubigraph server. Default url to bind is 'http://127.0.0.1:20738/RPC2'.

$u->clear()

This method clears all entities.

$vertex = $u->Vertex()
$vertex = $u->newVertex()
$vertex = $u->Vertex(%parameters)
$vertex = $u->newVertex(%parameters)

These class methods create a vertex (Ubigraph::Vertex instance), optionally with hash of parameters.

$edge = $u->Edge($v1, $v2)
$edge = $u->newEdge($v1, $v2)
$edge = $u->Edge($v1, $v2, %parameters)
$edge = $u->newEdge($v1, $v2, %parameters)

These class methods create an edge (Ubigraph::Edge instance), optionally with hash of parameters.

Ubigraph::Vertex class ^

The following method removes the vertex.

$vertex->remove()

The following methods change the corresponding vertex parameters.

$vertex->color($color)
$vertex->shape($shape)
$vertex->shapedetail($shapedetail)
$vertex->label($label)
$vertex->size($size)
$vertex->fontcolor($fontcolor)
$vertex->fontfamily($fontfamily)
$vertex->fontsize($fontsize)
$vertex->callback_left_doubleclick($url)

Ubigraph::Edge class ^

The following method removes the edge.

$edge->remove()

The following methods change the corresponding edge parameters.

$edge->arrow($arrow)
$edge->arrow_position($arrow_position)
$edge->arrow_radius($arrow_radius)
$edge->arrow_length($arrow_length)
$edge->arrow_reverse($arrow_reverse)
$edge->color($color)
$edge->label($label)
$edge->fontcolor($fontcolor)
$edge->fontfamily($fontfamily)
$edge->fontsize($fontsize)
$edge->oriented($oriented)
$edge->spline($spline)
$edge->showstrain($showstrain)
$edge->stroke($stroke)
$edge->strength($strength)
$edge->visible($visible)
$edge->width($width)

SEE ALSO ^

For the details of the parameters, users should refer to the UbiGraph XML-RPC Manual (http://ubietylab.net/ubigraph/content/Docs/index.html).

AUTHOR ^

Kazuharu Arakawa <gaou@sfc.keio.ac.jp> Kazuki Oshita <cory@g-language.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2008 by Kazuharu Arakawa

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: