Reputation: 15
I would like to recreate the petroleum product tree with graphviz.
For this I'm glad with graphviz possibility to create a graph structured in columns.
But how can I force a box to be rendered in the 3rd instead of the 2nd column without using an empty box as bypass?
Upvotes: 0
Views: 44
Reputation: 9057
I did a small experiment, important part is rank=same
:
digraph g {
rankdir=LR
node [shape=box ]
Petroleum
{rank=same Benzene;Xylene;Butanes}
{rank=same Ethylbenzene;Cyclobenzene;Cumene;"p-Xylene";Toluene}
Petroleum -> Benzene
Petroleum -> Xylene
Petroleum -> Butanes
Petroleum -> Toluene
Benzene -> Ethylbenzene
Benzene -> Cyclobenzene
Benzene -> Cumene
Xylene -> "p-Xylene"
}
Upvotes: 1