Graphics, Figures & Tables ⇒ Advice on building dependency diagram
Advice on building dependency diagram
There are 5 systems, S1, S2, S3, S4, S5
S1 --> S2 means S1 depends on S2
S1 --> S2, S3, S4
S2 --> S3, S5
S3 --> S2, S5
S4 --> S5
S5 --> S1, S2, S3, S4
How can I build dependency diagram like the one attached?
Also, is it possible that once I click on node S1, I get all the direct dependencies highlighted?
- Attachments
-
- dependancy_graph.jpg (24.46 KiB) Viewed 8993 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Advice on building dependency diagram
for drawing, i would recommend tikz. A bunch of quite similar graphs can be found in the graphs directory of TeXample.net.
What exactly do you mean by clicking and highlighting? Not sure, if this is so easy without the normal pdf-spec.
Re: Advice on building dependency diagram
This is what I mean by highlighting
http://live.yworks.com/demobrowser/inde ... aph-Viewer
Also, using Texample, can I just put my dependencies in one file and all the graphs would be built automatically as I keep changing the data ?
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: Advice on building dependency diagram
What do you mean by putting all dependencies in a file? Each graph will most likely be on tikz-picture. You need to do manual some work to get the graphs, there is no completely automated version.
Advice on building dependency diagram
What I mean is given this dataJohannes_B wrote:
What do you mean by putting all dependencies in a file? Each graph will most likely be on tikz-picture. You need to do manual some work to get the graphs, there is no completely automated version.
S1-->S2, S3
S3-->S1, S4
the program should position the nodes and draws lines accordingly between different nodes
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: Advice on building dependency diagram
But to be honest, i am no tikz expert.
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Advice on building dependency diagram

Stefan
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Advice on building dependency diagram
Code: Select all
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,graphs,graphdrawing}
\usegdlibrary{trees, layered, circular, force}
\begin{document}
\begin{tikzpicture}[>=stealth, rounded corners]
\graph [layered layout, level distance=6em,
sibling distance=8em,
nodes={draw,circle}] {
S2 -> {S3, S5},
S1 -> {S2, S3, S4},
S3 -> {S2, S5},
S4 -> S5,
S5 -> {S1, S2, S3, S4};
{ [same layer] S1, S4 };
{ [same layer] S2, S3 };
};
\end{tikzpicture}
\end{document}
Stefan
Re: Advice on building dependency diagram
it worked!