updated:  2023 18. December
published:  2023 18. December

Graphviz

Werkzeug zur Visualisierung von Graphen und Schemas.

Graphviz

Graphviz ist ein Generator zum erzeugen von Flußdiagrammen und Schemas.

Ein Beispiel könnte dieser Code sein:

git-data-flow.dot

digraph git {
	node[fontname="Helvetica,sans-Serif", fontsize="14", shape=rect];
	edge[fontname="Helvetica,sans-Serif", fontsize="12", minlen=0];
	nodesep=1.4;
	splines=ortho;
	//layout=circo;
	layout=dot;
	orientation=portrait;
	//mindist=5.0;
	//margin=3.5;
	charset="UTF-8"
	work [	
		shape=box, 
		style=filled, 
		color="#d9e7ee",
		//label="\n\n\n\nWorking\nDirectory\n\n\n\n\n",
		label="Working\nDirectory",
		margin="0.15,0.9",
	];

	stage [ 
		style=filled, 
		color=darkorange,
		label="Staging\nArea",
		margin="0.15,0.4",
	];
	
	branch [
		shape=cylinder, 
		style=filled, 
		color=black,
		fillcolor=darkolivegreen3, 
		label="Repository\n\nBranch\nHEAD",
		margin="0.15,0.5",
	];
	
	stage	-> work 	[arrowhead=empty, color=red, 	taillabel="checkout   "];
	work	-> branch 	[arrowhead=empty, color=green, 	xlabel="commit -a"];
	branch	-> work 	[arrowhead=empty, color=red, 	xlabel="checkout HEAD"];
	work 	-> stage 	[arrowhead=empty, color=green, 	taillabel="   add"];
	stage	-> branch 	[arrowhead=empty, color=green, 	taillabel="   commit"];

	rank=same;
	//rankdir=TB;
		{
		"work"
		"stage"
		"branch"
		}
}

Mit folgendem Befehl wird eine skalierbare Vektorgraphic *.svg erezeugt.


 dot.exe -T svg git-data-flow.dot > git-data-flow.svg

Und so sieht die Grafik aus:

no image
 Git Data Flow 

Für Testzwecke gibt es auch Onlineeditoren.

onlineeditor1
onlineeditor2

Stichworte (tags)