need help producing a circular graph with twopi or dot

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

need help producing a circular graph with twopi or dot

Rahul Nabar
Hi,

I noticed a really nice example of a circular graph in the gallery. It says it was created using twopi. Any documentation around where I could find how to do something like that?

I tried using twopi but I'm somewhat confused as to how to use it; I suspect it is a preprocessor for dot? I tried using the dot file for the "networks circular graph" from the Gallery but got a very truncated version.Maybe the settings on the webpage were hardcoded for a page of a certain size? Obviously I'm missing something but I can't figure what it is!

Any suggestions or pointers? I'd try a RTFM if I only knew where to look!

-Rahul

_______________________________________________
[hidden email]
https://mailman.research.att.com/mailman/listinfo/graphviz-interest
Reply | Threaded
Open this post in threaded view
|

Re: need help producing a circular graph with twopi or dot

Emden R. Gansner


Rahul Nabar wrote:

> I noticed a really nice example of a circular graph in the gallery. It
> says it was created using twopi. Any documentation around where I
> could find how to do something like that?

Which example are you interested in?

>
> I tried using twopi but I'm somewhat confused as to how to use it; I
> suspect it is a preprocessor for dot? I tried using the dot file for
> the "networks circular graph" from the Gallery but got a very
> truncated version.Maybe the settings on the webpage were hardcoded for
> a page of a certain size? Obviously I'm missing something but I can't
> figure what it is!
>
twopi is its own layout program.  It is a radial layout. That is, one
node is placed in the center; the nodes connected to the center node
are placed on a circle around it; any remaining nodes connected to those
nodes are placed on the next circle,; and so on.

It can be a very effective layout in certain contexts. It is very fast,
and can be used on large graphs.

The main problem with the algorithm is that it is very sensitive to the
choice of the center node. Choosing one node for the
center will produce a beautiful layout. Choosing another node will
create a mess.

The program uses the same rendering parameters as the rest of Graphviz.
The attributes specific to twopi, which affect the layout,
can be found by looking for "twopi" in

    http://www.graphviz.org/doc/info/attrs.html

      - Emden


_______________________________________________
[hidden email]
https://mailman.research.att.com/mailman/listinfo/graphviz-interest
Reply | Threaded
Open this post in threaded view
|

Re: need help producing a circular graph with twopi or dot

Rahul Nabar
Hi Allan and Emden,

Thanks for trying to help! My fault! I should have provided more details.

Here goes:

>>Rahul Nabar wrote:
> >I noticed a really nice example of a circular graph in the gallery. It
> >says it was created using twopi. Any documentation around where I
>> could find how to do something like that?
>Which example are you interested in?

This is the example I was talking about:
http://www.graphviz.org/Gallery/twopi/twopi2.html

So, should I be invoking twopi separately on the command like as Emden indicated? Or use it as a rendering engine with the -K flag like Allan showed. I tried to use the file from the example I mention to try and recreate that graph in the gallery. Cannot reproduce it exactly yet  though; but pretty close. I wish I could attach an image! Maybe I am still doing something wrong.

Emden, thanks for indicating how to search for twopi options in the documentation. My bad! I was looking more in the way of extensive documentation the way neato etc. has.

Does anyone have example scripts that work well with twopi. I am somewhat lost from the Attributes as to how one could use them. I would appreciate more help about how to use those attributes to tweak / guide the circular layout.

Thanks again guys!

-Rahul


_______________________________________________
[hidden email]
https://mailman.research.att.com/mailman/listinfo/graphviz-interest
Reply | Threaded
Open this post in threaded view
|

Re: need help producing a circular graph with twopi or dot

Emden R. Gansner
Rahul Nabar wrote:
> <http://www.graphviz.org/Gallery/twopi/twopi2.html>
>
> So, should I be invoking twopi separately on the command like as Emden
> indicated? Or use it as a rendering engine with the -K flag like Allan
> showed. I tried to use the file from the example I mention to try and
> recreate that graph in the gallery. Cannot reproduce it exactly yet  
> though; but pretty close. I wish I could attach an image! Maybe I am
> still doing something wrong.

Apparently, Allan responded just to you and not the mailing list, so I'm
not sure what he recommended. In general, the -K option is not
necessary, as the layout algorithm is determined by
the command name. The -K flag allows one to override this mapping. Thus,

    dot -Kneato

will act like neato.
>
> Does anyone have example scripts that work well with twopi. I am
> somewhat lost from the Attributes as to how one could use them. I
> would appreciate more help about how to use those attributes to tweak
> / guide the circular layout.
>
In the example you were interested in, the layout attributes set are
ratio and ranksep. Again, I stress that twopi really depends on the
choice of the central node.
I forgot to mention in my previous posting that, if this node isn't
specified, twopi will pick some central node.

    Emden

_______________________________________________
[hidden email]
https://mailman.research.att.com/mailman/listinfo/graphviz-interest