Dear list,
I am new to RGraphViz and currently evaluating it's options. So bare
with me regarding this basic question....
Say i have three nodes, A, B and C. How can i plot a graph in which
the length of the edges between the nodes are user-defined? Say
between A en B the length should be 1, between A and C this should be
2, and between B and C this should be 0.5?
I found that the argument "len" is able to set the length of the
edges,
http://www.graphviz.org/pub/scm/graphviz2/doc/info/attrs.html#d:len
(len: Preferred edge length, in inches.)
Also from the info @ the link:
len; Edge;, double; 1.0 (neato); 0.3(fdp); fdp, neato only
>From the above I conclude that depending on the lay-out (neato or
fdp) the length of ALL edges in the graph are set to 1 and 0.3 inch,
respectively.
But how to vary the length per edge? Or is what i would like to to not
possible?
Any feedback is much appreciated!
Guido
------------------------------------------------
Guido Hooiveld, PhD
Nutrition, Metabolism & Genomics Group
Division of Human Nutrition
Wageningen University
Biotechnion, Bomenweg 2
NL-6703 HD Wageningen
the Netherlands
tel: (+)31 317 485788
fax: (+)31 317 483342
internet: http://nutrigene.4t.com<http: nutrigene.4t.com=""/>
email: guido.hooiveld@wur.nl
[[alternative HTML version deleted]]
Hi Guido,
I share with you my experience and a chunk of code to better clarify
the concepts;
after many attempts in trying to draw graphs with defined edge
lengths, my conclusion was that "dot" is the tool most suitable to do
this,because more "flexible";
the others (neato and fdp) are more aimed to draw nice graphs
instead of graphs with precise edge lengths(the value you put for the
argument len doesn't affect the final result!); the only way I found
to do something "close" to what I wanted was this: (note the argument
"weight" aimed to force the program to take more into account the
value of len parameter)
graph G {
overlap = false;
node [shape=box,style=filled,width=.3, height=.3];
ds1N -- ds1P [len=0.16,weight=15];
ds1P -- ds2P [len=0.12,weight=5];
ds1P -- ds2N [len=0.20,weight=5];
ds1N -- ds2P [len=1.00,weight=18];
ds1N -- ds2N [len=0.89,weight=15];
ds2N -- ds2P [len= 0.48,weight=18];
}
Hope this can help.
Best,
maria
--
Maria Persico, PhD
Applied Bioinformatics Group, Biotec, TU Dresden,
Tatzberg 47-51, 01307 Dresden
maria.persico at biotec.tu-dresden.de
persico.maria at gmail.com
Phone: +49 (0)351 463 40020
Fax: +49 (0)351 463 40087
e-mail maria.persico at uniroma2.it
Def. Quota "Hooiveld, Guido" <guido.hooiveld at="" wur.nl="">:
> Dear list,
>
> I am new to RGraphViz and currently evaluating it's options. So bare
> with me regarding this basic question....
>
> Say i have three nodes, A, B and C. How can i plot a graph in which
> the length of the edges between the nodes are user-defined? Say
> between A en B the length should be 1, between A and C this should
> be 2, and between B and C this should be 0.5?
> I found that the argument "len" is able to set the length of the
edges,
> http://www.graphviz.org/pub/scm/graphviz2/doc/info/attrs.html#d:len
> (len: Preferred edge length, in inches.)
> Also from the info @ the link:
> len; Edge;, double; 1.0 (neato); 0.3(fdp); fdp, neato only
>
>> From the above I conclude that depending on the lay-out (neato or
>> fdp) the length of ALL edges in the graph are set to 1 and 0.3
>> inch, respectively.
>
> But how to vary the length per edge? Or is what i would like to to
> not possible?
>
> Any feedback is much appreciated!
>
> Guido
>
> ------------------------------------------------
> Guido Hooiveld, PhD
> Nutrition, Metabolism & Genomics Group
> Division of Human Nutrition
> Wageningen University
> Biotechnion, Bomenweg 2
> NL-6703 HD Wageningen
> the Netherlands
> tel: (+)31 317 485788
> fax: (+)31 317 483342
> internet: http://nutrigene.4t.com<http: nutrigene.4t.com=""/>
> email: guido.hooiveld at wur.nl
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
>
----------------------------------------------------------------
Invito da parte dell'Ateneo:
Il tuo futuro e quello della Ricerca Scientifica hanno bisogno del
tuo aiuto. Dona il 5 x mille all'Universita' di Roma Tor Vergata
codice fiscale: 80213750583 http://5x1000.uniroma2.it
It's my understanding that neato is an implementation of Kamada-Kwai,
which
is going to try to match the distance between two nodes in the
two-dimensional drawing to a pre-defined distance between nodes. By
default,
I think this distance is defined as the length of the shortest path
between
two nodes, but I'm pretty sure it can be overridden.
I would say that "dot", as a Sugiyama layout, is just going to try to
keep
edge lengths short. Sometimes, due to the constraints of the layout,
edges
can be quite long. I'm a little surprised that 'len' works with dot,
since
the documentation appears to say otherwise.
Michael
On Sun, May 30, 2010 at 3:00 PM, <prsmra01@uniroma2.it> wrote:
> Hi Guido,
> I share with you my experience and a chunk of code to better clarify
the
> concepts;
> after many attempts in trying to draw graphs with defined edge
lengths, my
> conclusion was that "dot" is the tool most suitable to do
this,because more
> "flexible";
> the others (neato and fdp) are more aimed to draw nice graphs
instead of
> graphs with precise edge lengths(the value you put for the argument
len
> doesn't affect the final result!); the only way I found to do
something
> "close" to what I wanted was this: (note the argument "weight" aimed
to
> force the program to take more into account the value of len
parameter)
>
> graph G {
>
> overlap = false;
> node [shape=box,style=filled,width=.3, height=.3];
>
> ds1N -- ds1P [len=0.16,weight=15];
> ds1P -- ds2P [len=0.12,weight=5];
> ds1P -- ds2N [len=0.20,weight=5];
> ds1N -- ds2P [len=1.00,weight=18];
> ds1N -- ds2N [len=0.89,weight=15];
> ds2N -- ds2P [len= 0.48,weight=18];
>
> }
> Hope this can help.
>
> Best,
> maria
> --
> Maria Persico, PhD
> Applied Bioinformatics Group, Biotec, TU Dresden,
> Tatzberg 47-51, 01307 Dresden
> maria.persico@biotec.tu-dresden.de
> persico.maria@gmail.com
> Phone: +49 (0)351 463 40020
> Fax: +49 (0)351 463 40087
>
> e-mail maria.persico@uniroma2.it
>
>
> Def. Quota "Hooiveld, Guido" <guido.hooiveld@wur.nl>:
>
>
> Dear list,
>>
>> I am new to RGraphViz and currently evaluating it's options. So
bare with
>> me regarding this basic question....
>>
>> Say i have three nodes, A, B and C. How can i plot a graph in which
the
>> length of the edges between the nodes are user-defined? Say between
A en B
>> the length should be 1, between A and C this should be 2, and
between B and
>> C this should be 0.5?
>> I found that the argument "len" is able to set the length of the
edges,
>> http://www.graphviz.org/pub/scm/graphviz2/doc/info/attrs.html#d:len
>> (len: Preferred edge length, in inches.)
>> Also from the info @ the link:
>> len; Edge;, double; 1.0 (neato); 0.3(fdp); fdp, neato only
>>
>> From the above I conclude that depending on the lay-out (neato or
fdp)
>>> the length of ALL edges in the graph are set to 1 and 0.3 inch,
>>> respectively.
>>>
>>
>> But how to vary the length per edge? Or is what i would like to to
not
>> possible?
>>
>> Any feedback is much appreciated!
>>
>> Guido
>>
>> ------------------------------------------------
>> Guido Hooiveld, PhD
>> Nutrition, Metabolism & Genomics Group
>> Division of Human Nutrition
>> Wageningen University
>> Biotechnion, Bomenweg 2
>> NL-6703 HD Wageningen
>> the Netherlands
>> tel: (+)31 317 485788
>> fax: (+)31 317 483342
>> internet: http://nutrigene.4t.com<http: nutrigene.4t.com=""/>
>> email: guido.hooiveld@wur.nl
>>
>>
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor@stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>>
>>
>
>
> ----------------------------------------------------------------
> Invito da parte dell'Ateneo:
> Il tuo futuro e quello della Ricerca Scientifica hanno bisogno del
> tuo aiuto. Dona il 5 x mille all'Universita' di Roma Tor Vergata
> codice fiscale: 80213750583 http://5x1000.uniroma2.it
>
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
[[alternative HTML version deleted]]
Hi,
for me it was important to have the edge lenght ds1P -- ds2P as the
smallest on but if you try this you can see that it doesn't work!
#command line
cat test.dot | neato -Teps >out.neatobis.eps
cat test.dot | dot -Teps >out.dotbis.eps
#the input script:
graph G {
overlap = false;
node [shape=box,style=filled,width=.3, height=.3];
ds1N -- ds1P [len=0.16,weight=5];
ds1P -- ds2P [len=0.12,weight=5];
ds1P -- ds2N [len=0.20,weight=4];
ds1N -- ds2P [len=1.00,weight=5];
ds1N -- ds2N [len=0.89,weight=5];
ds2N -- ds2P [len= 0.48,weight=4];
}
Cheers,
Maria
--
Maria Persico, PhD. student
http://cbm.bio.uniroma2.it/~maria/
MINT database group
Universita' di Tor Vergata, via della Ricerca scientifica 11
00133 Roma, Italy
Tel +39 0672594315 (Supervisor's room)
Fax +39 0672594766
Mobile phone: +393479715662
e-mail maria.persico at uniroma2.it
Quoting "Michael Lawrence" <lawrence.michael at="" gene.com="">:
> It's my understanding that neato is an implementation of Kamada-
Kwai, which
> is going to try to match the distance between two nodes in the
> two-dimensional drawing to a pre-defined distance between nodes. By
default,
> I think this distance is defined as the length of the shortest path
between
> two nodes, but I'm pretty sure it can be overridden.
>
> I would say that "dot", as a Sugiyama layout, is just going to try
to keep
> edge lengths short. Sometimes, due to the constraints of the layout,
edges
> can be quite long. I'm a little surprised that 'len' works with dot,
since
> the documentation appears to say otherwise.
>
> Michael
>
> On Sun, May 30, 2010 at 3:00 PM, <prsmra01 at="" uniroma2.it=""> wrote:
>
>> Hi Guido,
>> I share with you my experience and a chunk of code to better
clarify the
>> concepts;
>> after many attempts in trying to draw graphs with defined edge
lengths, my
>> conclusion was that "dot" is the tool most suitable to do
this,because more
>> "flexible";
>> the others (neato and fdp) are more aimed to draw nice graphs
instead of
>> graphs with precise edge lengths(the value you put for the argument
len
>> doesn't affect the final result!); the only way I found to do
something
>> "close" to what I wanted was this: (note the argument "weight"
aimed to
>> force the program to take more into account the value of len
parameter)
>>
>> graph G {
>>
>> overlap = false;
>> node [shape=box,style=filled,width=.3, height=.3];
>>
>> ds1N -- ds1P [len=0.16,weight=15];
>> ds1P -- ds2P [len=0.12,weight=5];
>> ds1P -- ds2N [len=0.20,weight=5];
>> ds1N -- ds2P [len=1.00,weight=18];
>> ds1N -- ds2N [len=0.89,weight=15];
>> ds2N -- ds2P [len= 0.48,weight=18];
>>
>> }
>> Hope this can help.
>>
>> Best,
>> maria
>> --
>> Maria Persico, PhD
>> Applied Bioinformatics Group, Biotec, TU Dresden,
>> Tatzberg 47-51, 01307 Dresden
>> maria.persico at biotec.tu-dresden.de
>> persico.maria at gmail.com
>> Phone: +49 (0)351 463 40020
>> Fax: +49 (0)351 463 40087
>>
>> e-mail maria.persico at uniroma2.it
>>
>>
>> Def. Quota "Hooiveld, Guido" <guido.hooiveld at="" wur.nl="">:
>>
>>
>> Dear list,
>>>
>>> I am new to RGraphViz and currently evaluating it's options. So
bare with
>>> me regarding this basic question....
>>>
>>> Say i have three nodes, A, B and C. How can i plot a graph in
which the
>>> length of the edges between the nodes are user-defined? Say
between A en B
>>> the length should be 1, between A and C this should be 2, and
between B and
>>> C this should be 0.5?
>>> I found that the argument "len" is able to set the length of the
edges,
>>>
http://www.graphviz.org/pub/scm/graphviz2/doc/info/attrs.html#d:len
>>> (len: Preferred edge length, in inches.)
>>> Also from the info @ the link:
>>> len; Edge;, double; 1.0 (neato); 0.3(fdp); fdp, neato only
>>>
>>> From the above I conclude that depending on the lay-out (neato or
fdp)
>>>> the length of ALL edges in the graph are set to 1 and 0.3 inch,
>>>> respectively.
>>>>
>>>
>>> But how to vary the length per edge? Or is what i would like to to
not
>>> possible?
>>>
>>> Any feedback is much appreciated!
>>>
>>> Guido
>>>
>>> ------------------------------------------------
>>> Guido Hooiveld, PhD
>>> Nutrition, Metabolism & Genomics Group
>>> Division of Human Nutrition
>>> Wageningen University
>>> Biotechnion, Bomenweg 2
>>> NL-6703 HD Wageningen
>>> the Netherlands
>>> tel: (+)31 317 485788
>>> fax: (+)31 317 483342
>>> internet: http://nutrigene.4t.com<http: nutrigene.4t.com=""/>
>>> email: guido.hooiveld at wur.nl
>>>
>>>
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> Bioconductor mailing list
>>> Bioconductor at stat.math.ethz.ch
>>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>>> Search the archives:
>>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>>
>>>
>>>
>>
>>
>> ----------------------------------------------------------------
>> Invito da parte dell'Ateneo:
>> Il tuo futuro e quello della Ricerca Scientifica hanno bisogno del
>> tuo aiuto. Dona il 5 x mille all'Universita' di Roma Tor Vergata
>> codice fiscale: 80213750583 http://5x1000.uniroma2.it
>>
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>
----------------------------------------------------------------
Invito da parte dell'Ateneo:
Il tuo futuro e quello della Ricerca Scientifica hanno bisogno del
tuo aiuto. Dona il 5 x mille all'Universita' di Roma Tor Vergata
codice fiscale: 80213750583 http://5x1000.uniroma2.it