Can't find the Appropriate means to use RANKDIR

Hello all,

Though i am new here and I don't know if this topic has been posted before. I have a problem using graphviz rankdir to redirect a path on a task. This is what my code looks like:


digraph example {
node [shape=record, fontname=Helvetica, fontsize=10];
a [ label="class A"];
b [ label="class B"];
c [ label="class C"];
d [ label="class D"];

a -> c;
d -> c;

{ rank=same, b, c, d }

From this, i am willing to have classD point directly to Class C and class C point directly to class B, without the shape or form changing as it is (see...rankdir.jpg). Can anyone help me out here?

i have tried using subgraph but the situation is still the same.

Please see Attachment.

RANKDIR.jpg19.21 KB
rankdirOutcome.JPG11.96 KB

I am a bit confused by what

I am a bit confused by what you are after. First, the dot graph you give has incorrect syntax. You can't have a comma after "rank=same". Second, removing the comma and running dot, I get the output which is similar to your rankdirOutcome.JPG but definitely different. Most important, what is it you are objecting to? A points to C; C points to B; and D points to C. Is the problem the missing edges in rankdirOutcome.JPG? That doesn't happen using dot.

Recent comments