Using Graphviz and dot language to plot friends and family

Last Updated or created 2022-10-14

I’ve been using the dotty language for many things, this is a who is who displayer.
iptables rules displayer, open ports, gluster brinks/nodes. netstat ports.,
Wil post more about this later


installing
apt-get install graphviz

View it on a website using mojozoom javascipt

demo : https://media.henriaanstoot.nl/websites/dotviewer/index.html

dot file example (changed names to protect the innocent)

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
digraph G {
size="960,960"
graph [fontsize=16];
node [fontsize=16];
ericewc [shape=diamond]
notoasat [shape=diamond]
rwke [shape=diamond]
prtsu [shape=diamond]
wkmre [shape=diamond]
hsocol [shape=diamond]
stm [shape=diamond]
scoisenr [shape=diamond]
lpetg [shape=diamond]
ptoi [shape=diamond]
nrnag -> rean;
rean -> grrdea;
rean -> kmoina;
nrnag -> aabrrba;
aabrrba -> edide;
aabrrba -> taamra;
wkmre -> renei;
renei -> ilem;
cpb -> mttne;
cpb -> mhyme;
ghnhlaid -> hsanvk;
hsanvk -> mray;
ghnhlaid -> erbnete -> kene;
erbnete -> ebnno;
erbnete -> hsan;
erbnete -> anek;
nehri -> hetctur;
nlicoe -> hetctur;
ueoqnim -> hetctur;
hetctur -> aisovwkrs;
aisovwkrs -> amnroa;
aisovwkrs -> gioud;
aisovwkrs -> aulra;
rwke -> lemtcu;
lemtcu -> rhary;
lemtcu -> gmc;
prtsu -> ico;
prtsu -> hloaa;
nehri -> prtsu;
}
digraph G { size="960,960" graph [fontsize=16]; node [fontsize=16]; ericewc [shape=diamond] notoasat [shape=diamond] rwke [shape=diamond] prtsu [shape=diamond] wkmre [shape=diamond] hsocol [shape=diamond] stm [shape=diamond] scoisenr [shape=diamond] lpetg [shape=diamond] ptoi [shape=diamond] nrnag -> rean; rean -> grrdea; rean -> kmoina; nrnag -> aabrrba; aabrrba -> edide; aabrrba -> taamra; wkmre -> renei; renei -> ilem; cpb -> mttne; cpb -> mhyme; ghnhlaid -> hsanvk; hsanvk -> mray; ghnhlaid -> erbnete -> kene; erbnete -> ebnno; erbnete -> hsan; erbnete -> anek; nehri -> hetctur; nlicoe -> hetctur; ueoqnim -> hetctur; hetctur -> aisovwkrs; aisovwkrs -> amnroa; aisovwkrs -> gioud; aisovwkrs -> aulra; rwke -> lemtcu; lemtcu -> rhary; lemtcu -> gmc; prtsu -> ico; prtsu -> hloaa; nehri -> prtsu; }
           digraph G {
                size="960,960"
                graph [fontsize=16];
                node  [fontsize=16];
                ericewc [shape=diamond]
                notoasat [shape=diamond]
                rwke [shape=diamond]
                prtsu [shape=diamond]
                wkmre [shape=diamond]
                hsocol [shape=diamond]
                stm [shape=diamond]
                scoisenr [shape=diamond]
                lpetg [shape=diamond]
                ptoi [shape=diamond]
                nrnag -> rean;
                rean -> grrdea;
                rean -> kmoina;
                nrnag -> aabrrba;
                aabrrba -> edide;
                aabrrba -> taamra;
                wkmre -> renei;
                renei -> ilem;
                cpb -> mttne;
                cpb -> mhyme;
                ghnhlaid -> hsanvk;
                hsanvk -> mray;
                ghnhlaid -> erbnete -> kene;
                erbnete -> ebnno;
                erbnete -> hsan;
                erbnete -> anek;
                nehri -> hetctur;
                nlicoe -> hetctur;
                ueoqnim -> hetctur;
                hetctur -> aisovwkrs;
                aisovwkrs -> amnroa;
                aisovwkrs -> gioud;
                aisovwkrs -> aulra;
                rwke -> lemtcu;
                lemtcu -> rhary;
                lemtcu -> gmc;
                prtsu -> ico;
                prtsu -> hloaa;
                nehri -> prtsu;
           }

Making the graphics

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
dot -Tsvg -obig.svg goed.dot
#gs -q -dNOPAUSE -dBATCH -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=png16m -sOutputFile=big.png big.ps
convert big.svg big.png
convert -resize 800x800 big.png bigsmall.png
dot -Tsvg -obig.svg goed.dot #gs -q -dNOPAUSE -dBATCH -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=png16m -sOutputFile=big.png big.ps convert big.svg big.png convert -resize 800x800 big.png bigsmall.png
dot -Tsvg -obig.svg goed.dot
#gs -q -dNOPAUSE -dBATCH -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=png16m -sOutputFile=big.png big.ps
convert big.svg big.png
convert -resize 800x800 big.png bigsmall.png
Spread the love