Draw a diagram

283 views
Skip to first unread message

Marco Moretto

unread,
Feb 5, 2011, 6:46:21 AM2/5/11
to Gremlin-users
Hi all,
I would like to draw a graph in a image file. I'm looking at the
GraphML but it is not clear to me how I can get and XML file I can use
to produce an image file. Shortly I would like to obtain something
like this https://github.com/tinkerpop/blueprints/raw/master/doc/images/graph-example-1.jpg
using gremlin.
Thanks in advance.

Marco

Marko Rodriguez

unread,
Feb 5, 2011, 11:27:40 AM2/5/11
to gremli...@googlegroups.com
Hi,

You mean, use Gremlin to generate an image -- like a graph visualization? The best thing for that right now is using JUNG visualization package over Blueprints:
https://github.com/tinkerpop/blueprints/wiki/JUNG-Ouplementation

You mean, generate an image like the image I created called graph-example-1.jpg? I used OmniGraffle to produce that image:
http://www.omnigroup.com/products/omnigraffle/

...?,
Marko.

Chris Diehl

unread,
Feb 5, 2011, 11:33:01 AM2/5/11
to Gremlin-users
Hi Marco,

Another option for visualizing a graph in your database is to use
Gephi. http://gephi.org/
Gephi loads GraphML files; so you can export a GraphML representation
of your graph from Gremlin and then load it into Gephi to view and
process it.

Chris
> > like thishttps://github.com/tinkerpop/blueprints/raw/master/doc/images/graph-e...

Daniel Quest

unread,
Feb 5, 2011, 11:58:16 AM2/5/11
to gremli...@googlegroups.com
I was also thinking about how to render a graph directly from Gremlin
into Cytoscape (http://www.cytoscape.org/) It is possible to make an
excel file or something simple and load it in, Cytoscape has lots of
good features. But what I would like to do is automatically render
stuff from Gremlin via a cytoscape plugin. They have a plugin for
Groovy already... but I can only work on it when my wife does not need
me. Keep ya posted...

-Daniel

Marco Moretto

unread,
Feb 5, 2011, 1:03:02 PM2/5/11
to Gremlin-users
Hi guys,
thanks to all of you for answering.
@Chris: I already used Gephi for other graph representation in the
past, it should be perfect to have an XML file from Gremlin to give to
Gephi.
The problem is that I do not understand how to export an XML file
suitable for Gephi directly from Gremlin. I thought something like
import com.tinkerpop.blueprints.pgm.oupls.sail.*
import com.tinkerpop.blueprints.pgm.util.graphml.*
g = new NativeStoreSailGraph('/path/to/my/repository')
new GraphMLWriter().outputGraph(g, System.out)

I'm sorry for bothering you but I don't find an answer by myself
looking at blueprints.

Thanks.

Marco


On Feb 5, 5:58 pm, Daniel Quest <daniel.qu...@gmail.com> wrote:
> I was also thinking about how to render a graph directly from Gremlin
> into Cytoscape (http://www.cytoscape.org/)  It is possible to make an
> excel file or something simple and load it in, Cytoscape has lots of
> good features.  But what I would like to do is automatically render
> stuff from Gremlin via a cytoscape plugin.  They have a plugin for
> Groovy already... but I can only work on it when my wife does not need
> me.  Keep ya posted...
>
> -Daniel
>
>
>
>
>
>
>
> On Sat, Feb 5, 2011 at 11:33 AM, Chris Diehl <cpdi...@gmail.com> wrote:
> > Hi Marco,
>
> > Another option for visualizing a graph in your database is to use
> > Gephi.http://gephi.org/

Marko Rodriguez

unread,
Feb 5, 2011, 1:09:57 PM2/5/11
to gremli...@googlegroups.com
Hi Marco,

Unfortunately, GraphMLReader/Writer does not work for RDF graphs :( .... It has to do with the fact that you can't g.V an RDF graph as there is no concept of vertices in RDF (only edges).

In theory, its possible, I just haven't gotten around to making it work for RDF.

Sorry,
Marko.

http://markorodriguez.com

Marco Moretto

unread,
Feb 5, 2011, 5:45:03 PM2/5/11
to Gremlin-users
Hi Marko,
no problem. I will use another method.
Thanks.

Marco
Reply all
Reply to author
Forward
0 new messages