Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000621graphvizDotpublic2006-09-15 12:002011-04-28 04:03
ReporterTeresa 
Assigned Toellson 
PrioritynormalSeveritycosmeticReproducibilityalways
StatusclosedResolutionfixed 
PlatformOS*-Linux-OS Version
Summary0000621: drawing a permutohedron
Description



Dear Graphviz developers,



This is not really a bug, but I would like to ask you if in the next
dot file it is possible to keep the nice disposition of the nodes when
considering the last line.



This file is automatically generated from our MuPAD combinatorial
package MuPAD-Combinat: http://mupad-combinat.sourceforge.net/. [^]



We have already used dot for generating very nice graphs of
combinatorial objects, please have a look to
http://igm.univ-mlv.fr/~teresa/cyclageTableaux8.dot [^]
http://igm.univ-mlv.fr/~teresa/cyclageTableaux8.dot.ps [^]
for (a large) example.



Thanks for your help,



Teresa Gomez-Diaz
Steps To Reproduce

// dot -Tps permu.dot -o permu.dot.ps

digraph G {
node [shape=plaintext];
N_1 [label = " [1, 2, 3] " ];
N_1 -> N_2 [ label = " 1 " ];
N_1 -> N_3 [ label = " 2 " ];
N_2 [label = " [2, 1, 3] " ];
N_2 -> N_1 [ label = " 1 " ];
N_2 -> N_4 [ label = " 2 " ];
N_4 [label = " [2, 3, 1] " ];
N_4 -> N_5 [ label = " 1 " ];
N_4 -> N_2 [ label = " 2 " ];
N_5 [label = " [3, 2, 1] " ];
N_5 -> N_4 [ label = " 1 " ];
N_6 [label = " [3, 1, 2] " ];
N_6 -> N_3 [ label = " 1 " ];
N_6 -> N_5 [ label = " 2 " ];
N_3 [label = " [1, 3, 2] " ];
N_3 -> N_6 [ label = " 1 " ];
N_3 -> N_1 [ " 2 " ];
//N_5 -> N_6 [ label = " 2 " ];
}
Additional Information

[ellson] I understand your report to be about the layout you get when the last line of the graph is uncommented?
the resulting layout is less symetric than before, with one long pair of edges.

It seems to me that the graph is not strongly directed. You could either use a different layout engine,
e.g.:
   neato -Tps permu.dot -o permu.dot.ps

or you could modify the graph to make it more strongly directed, e.g.:
 
<CD>
// dot -Tps permu.dot -o permu.dot.ps
digraph G {
node [shape=plaintext];
N_1 [label = " [1, 2, 3] " ];
N_2 [label = " [2, 1, 3] " ];
N_3 [label = " [1, 3, 2] " ];
N_4 [label = " [2, 3, 1] " ];
N_5 [label = " [3, 2, 1] " ];
N_6 [label = " [3, 1, 2] " ];
N_1 -> N_2 [ label = " 1 " ];
N_1 -> N_2 [ label = " 1 " dir=back];
N_1 -> N_3 [ label = " 2 " ];
N_1 -> N_3 [ label = " 2 " dir=back];
N_2 -> N_4 [ label = " 2 " ];
N_2 -> N_4 [ label = " 2 " dir=back];
N_3 -> N_6 [ label = " 1 " ];
N_3 -> N_6 [ label = " 1 " dir=back];
N_4 -> N_5 [ label = " 1 " ];
N_4 -> N_5 [ label = " 1 " dir=back];
N_6 -> N_5 [ label = " 2 " ];
N_6 -> N_5 [ label = " 2 " dir=back];
}
</CD>


I note that the edge labels are the same in both directions, so you could use dir=both
to simplify the diagram:

<CD>
// dot -Tps permu.dot -o permu.dot.ps
digraph G {
node [shape=plaintext];
N_1 [label = " [1, 2, 3] " ];
N_2 [label = " [2, 1, 3] " ];
N_3 [label = " [1, 3, 2] " ];
N_4 [label = " [2, 3, 1] " ];
N_5 [label = " [3, 2, 1] " ];
N_6 [label = " [3, 1, 2] " ];
edge [dir=both]
N_1 -> N_2 [ label = " 1 " ];
N_1 -> N_3 [ label = " 2 " ];
N_2 -> N_4 [ label = " 2 " ];
N_3 -> N_6 [ label = " 1 " ];
N_4 -> N_5 [ label = " 1 " ];
N_6 -> N_5 [ label = " 2 " ];
}
</CD>

<additional_information><![CDATA[

[teresa] Yes, this is the problem.
Thank you very much for your answers and examples.

After considering the possibilities with the graph for
permutations of size 4, we think that the best solution
is to compute the rank of the nodes, so we need to
re-code the graph generation.
(see dot file below, commenting in or out the
rank information)

-------------------------------------------------------
<CD>
digraph G {
node [shape=plaintext];
ordering=out;
N_1 [label = " [1, 2, 3, 4] " ];
N_2 [label = " [2, 1, 3, 4] " ];
N_3 [label = " [1, 3, 2, 4] " ];
N_4 [label = " [1, 2, 4, 3] " ];
N_5 [label = " [2, 3, 1, 4] " ];
N_6 [label = " [2, 1, 4, 3] " ];
N_7 [label = " [3, 2, 1, 4] " ];
N_8 [label = " [2, 3, 4, 1] " ];
N_9 [label = " [3, 1, 2, 4] " ];
N_10 [label = " [3, 2, 4, 1] " ];
N_11 [label = " [3, 1, 4, 2] " ];
N_12 [label = " [1, 3, 4, 2] " ];
N_13 [label = " [1, 4, 3, 2] " ];
N_14 [label = " [3, 4, 1, 2] " ];
N_15 [label = " [4, 3, 1, 2] " ];
N_16 [label = " [3, 4, 2, 1] " ];
N_17 [label = " [4, 1, 3, 2] " ];
N_18 [label = " [4, 3, 2, 1] " ];
N_19 [label = " [4, 1, 2, 3] " ];
N_20 [label = " [1, 4, 2, 3] " ];
N_21 [label = " [4, 2, 1, 3] " ];
N_22 [label = " [2, 4, 1, 3] " ];
N_23 [label = " [4, 2, 3, 1] " ];
N_24 [label = " [2, 4, 3, 1] " ];
//{ rank=same; N_2; N_3; N_4; }
//{ rank=same; N_5; N_6; N_9; N_12; N_20; }
//{ rank=same; N_7; N_8; N_11; N_13; N_19; N_22; }
//{ rank=same; N_10; N_14; N_17; N_21; N_24; }
//{ rank=same; N_15; N_16; N_23; }
edge [dir=both];
N_1 -> N_2 [color = "#000000", fontcolor = "#000000", label = " 1 " ];
N_1 -> N_3 [color = "#000000", fontcolor = "#000000", label = " 2 " ];
N_1 -> N_4 [color = "#000000", fontcolor = "#000000", label = " 3 " ];
N_2 -> N_5 [color = "#000000", fontcolor = "#000000", label = " 2 " ];
N_2 -> N_6 [color = "#000000", fontcolor = "#000000", label = " 3 " ];
N_3 -> N_9 [color = "#000000", fontcolor = "#000000", label = " 1 " ];
N_3 -> N_12 [color = "#000000", fontcolor = "#000000", label = " 3 " ];
N_4 -> N_6 [color = "#000000", fontcolor = "#000000", label = " 1 " ];
N_4 -> N_20 [color = "#000000", fontcolor = "#000000", label = " 2 " ];
N_5 -> N_7 [color = "#000000", fontcolor = "#000000", label = " 1 " ];
N_5 -> N_8 [color = "#000000", fontcolor = "#000000", label = " 3 " ];
N_6 -> N_22 [color = "#000000", fontcolor = "#000000", label = " 2 " ];
N_7 -> N_9 [color = "#000000", fontcolor = "#000000", label = " 2 " ];
N_7 -> N_10 [color = "#000000", fontcolor = "#000000", label = " 3 " ];
N_8 -> N_10 [color = "#000000", fontcolor = "#000000", label = " 1 " ];
N_8 -> N_24 [color = "#000000", fontcolor = "#000000", label = " 2 " ];
N_9 -> N_11 [color = "#000000", fontcolor = "#000000", label = " 3 " ];
N_10 -> N_16 [color = "#000000", fontcolor = "#000000", label = " 2 " ];
N_11 -> N_12 [color = "#000000", fontcolor = "#000000", label = " 1 " ];
N_11 -> N_14 [color = "#000000", fontcolor = "#000000", label = " 2 " ];
N_12 -> N_13 [color = "#000000", fontcolor = "#000000", label = " 2 " ];
N_13 -> N_17 [color = "#000000", fontcolor = "#000000", label = " 1 " ];
N_13 -> N_20 [color = "#000000", fontcolor = "#000000", label = " 3 " ];
N_14 -> N_15 [color = "#000000", fontcolor = "#000000", label = " 1 " ];
N_14 -> N_16 [color = "#000000", fontcolor = "#000000", label = " 3 " ];
N_15 -> N_17 [color = "#000000", fontcolor = "#000000", label = " 2 " ];
N_15 -> N_18 [color = "#000000", fontcolor = "#000000", label = " 3 " ];
N_16 -> N_18 [color = "#000000", fontcolor = "#000000", label = " 1 " ];
N_17 -> N_19 [color = "#000000", fontcolor = "#000000", label = " 3 " ];
N_18 -> N_23 [color = "#000000", fontcolor = "#000000", label = " 2 " ];
N_19 -> N_20 [color = "#000000", fontcolor = "#000000", label = " 1 " ];
N_19 -> N_21 [color = "#000000", fontcolor = "#000000", label = " 2 " ];
N_21 -> N_22 [color = "#000000", fontcolor = "#000000", label = " 1 " ];
N_21 -> N_23 [color = "#000000", fontcolor = "#000000", label = " 3 " ];
N_22 -> N_24 [color = "#000000", fontcolor = "#000000", label = " 3 " ];
N_23 -> N_24 [color = "#000000", fontcolor = "#000000", label = " 1 " ];
}
</CD>


TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID1023
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENTFixed
VERSION     dot version 2.2 (Mon Oct 17 18:09:01 UTC 2005)
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => user695


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker