How to create a figure with two graphviz diagrams in it?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to create a figure with two graphviz diagrams in it?

siddjain
Hello,

I want to create a figure containing two graphviz diagrams. How can I do this in asciidoc?

[graphviz]
....
digraph A {
}
....

[graphviz]
....
digraph B {
}
....

I want the diagrams above to be part of a single figure.

Sid
Reply | Threaded
Open this post in threaded view
|

Re: How to create a figure with two graphviz diagrams in it?

Alexander Schwartz
Graphviz supports two subgraphs like this:
[graphviz]
....
digraph G {
compund=true ;
subgraph A {
a -> b;
b -> a;
};
subgraph B { rankdir=LR;
1->2;
2->1;
};
}
....
I hope this will get you closer to your goal.
Alexander Schwartz (alexander.schwartz@gmx.net)
https://www.ahus1.de
Reply | Threaded
Open this post in threaded view
|

Re: How to create a figure with two graphviz diagrams in it?

siddjain
Thanks Alex. That works. One thing I couldn't get to work was adding label to each of the subgraphs. Turns out the subgraphs need to have a cluster prefix for that to work! Adding a note in case I run across this problem again.