Dot
From Linuxintro
Revision as of 17:56, 22 May 2020 by imported>ThorstenStaerk (→Layout)
Dot is a program from the graphviz package to draw graphs from the command line. It can, among other usages, be used to create MindMaps.
Contents
Mindmap
Here's how you create a mindmap with dot:
source.txt <source>
digraph "Wikimap" { "OS" -> "OpenSource" "OpenSource" -> "Linux" "OpenSource" -> "BSD" "BSD" -> "NetBSD" "BSD" -> "FreeBSD" }
</source> create the graphical map <source>
dot -Tps -o mindmap.ps source.txt
</source> view the graphical map <source>
konqueror mindmap.ps
</source>
remove arrows
Here is how you draw a mindmap without arrows, you use "arrowhead=none":
source.txt <source>
digraph "Wikimap" { "cloud" -> "public" [arrowhead=none] "cloud" -> "private" [arrowhead=none] "cloud" -> "data" [arrowhead=none] "cloud" -> "virtual machines" [arrowhead=none] "data" -> "ownCloud" [arrowhead=none] "public" -> "ownCloud" [arrowhead=none] }
</source> create the graphical map <source>
$ dot -Tps -o mindmap.ps source.txt
</source> view the graphical map <source>
$ konqueror mindmap.ps
</source>
Layout
You can use several layouts: dot, twopi, neato and circo. Here is the neato layout:
Sourcecode for the above: <source> digraph "Wikimap" {
layout=neato overlap=false "OS" -> "OpenSource" "OpenSource" -> "Linux" "OpenSource" -> "BSD" "BSD" -> "NetBSD" "BSD" -> "FreeBSD"
} </source>