[Lemon-user] Question for layout capabilities.

Cherif Mouaouia Bouzid cherifmouaouia.bouzid at gmail.com
Thu Feb 23 14:13:03 CET 2012


Hi Chris

> I want to keep my software free from Graphyiz complex
dependencies

So it is better to create a *.dot file where you describe your graph (in
your program) then build it with GraphViz once your program is closed.
Alpar gives you the way to write this dot file.

Here is an example of a dot file (circuit.dot) that describes a circuit of
length 3 :

digraph G {
a -> b ;
b -> c ;
c -> a ;
}

Type the following command from the console (Graphviz needs to be
installed) and you get the circuit in jpeg format:

dot -Tjpg -ocircuit.jpg circuit.dot

You can change the layout for example with the following command :

neato -Tjpg -ocircuit.jpg circuit.dot

It is worth trying

>Of course, if anyone takes the hassle of developing a configurable
>general purpose .dot exporter, we are very happy to add it to lemon.

What are the required skills to do so ?

Regards,

Cherif


Le 23 février 2012 05:47, Alpár Jüttner <alpar at cs.elte.hu> a écrit :

> Hi,
>
> > Does lemon library exports in .dot format?
>
> Not yet, but it is easy to do by hand. For example if you need no extra
> customization, this will do the job:
>
> std::cout << "digraph G {" << std::endl;
> for(ListGraph::ArcIt a(g);a!=INVALID;++a)
>  std::cout << "n" << g.id(g.source(a))
>            << " -> " << "n" << g.id(g.source(a))
>            << std::endl;
> std::cout << "}" << std::endl;
>
>
> The dot language is described here:
> http://www.graphviz.org/content/dot-language
> This one is a nice (though a bit outdated) tutorial to the .dot
> language: http://www.graphviz.org/pdf/dotguide.pdf
>
> Of course, if anyone takes the hassle of developing a configurable
> general purpose .dot exporter, we are very happy to add it to lemon.
>
>
> Regards,
> Alpar
>
> > Regards
> > Chris
> >
> > On Wed, Feb 22, 2012 at 11:01 AM, Cherif Mouaouia Bouzid
> > <cherifmouaouia.bouzid at gmail.com> wrote:
> > > Hi Chris
> > >
> > > There exists a software called Graphviz that proposes different kinds
> of
> > > layouts, see :
> > >
> > > http://www.graphviz.org/About.php
> > >
> > > You can either try to integrate Graphviz to your code as a library or
> > >
> > > create a file in your code where you describe your graph in *.dot
> format
> > > then build it with GraphViz outside the program.
> > >
> > > Regards,
> > >
> > > Cherif
> > >
> > > Le 21 février 2012 15:31, Chris Margiolas <chrmargiolas at gmail.com> a
> écrit :
> > >>
> > >> Hello,
> > >>
> > >> I am checking lemon for my project, which requires complex
> computations
> > >> over graphs and I would like to know if there is any advanced layout
> system
> > >> for exporting graphs to typical picture formats. I saw some basic
> outputs
> > >> but I would like to have better representation results.
> > >>
> > >>
> > >> Regards
> > >> Chris
> > >> _______________________________________________
> > >> Lemon-user mailing list
> > >> Lemon-user at lemon.cs.elte.hu
> > >> http://lemon.cs.elte.hu/mailman/listinfo/lemon-user
> > >
> > >
> > >
> > >
> > _______________________________________________
> > Lemon-user mailing list
> > Lemon-user at lemon.cs.elte.hu
> > http://lemon.cs.elte.hu/mailman/listinfo/lemon-user
> >
>
>
>


-- 
Mouaouia Cherif BOUZID
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20120223/9c90b045/attachment.html>


More information about the Lemon-user mailing list