Difference between revisions of "Dot"
From Linuxintro
imported>ThorstenStaerk |
m |
||
(22 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | Dot is a [[program]] from the [[ | + | Dot is a [[program]] from the [http://www.graphviz.org/ graphviz] [[package]] to draw graphs from the command line. It can, among other usages, be used to create [[MindMap]]s. |
− | |||
− | |||
= Mindmap = | = Mindmap = | ||
+ | [[image:Mindmap.png|right|thumb|211px|A mindmap created by the program dot.]] | ||
Here's how you create a mindmap with dot: | Here's how you create a mindmap with dot: | ||
Line 15: | Line 14: | ||
} | } | ||
create the graphical map | create the graphical map | ||
− | $ dot - | + | dot -Tpdf -o mindmap.pdf source.txt |
+ | view the graphical map | ||
+ | xdg-open mindmap.pdf | ||
+ | |||
+ | = remove arrows = | ||
+ | [[image:cloudmap.png|right|thumb|211px|A mindmap created by the program dot.]] | ||
+ | Here is how you draw a mindmap without arrows, you use "arrowhead=none": | ||
+ | |||
+ | '''source.txt''' | ||
+ | |||
+ | 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] | ||
+ | } | ||
+ | create the graphical map | ||
+ | $ dot -Tpdf -o mindmap.pdf source.txt | ||
view the graphical map | view the graphical map | ||
− | $ | + | $ xdg-open mindmap.pdf |
+ | |||
+ | = Layout = | ||
+ | You can use several layouts: dot, twopi, neato and circo. Here is the neato layout: | ||
+ | |||
+ | [[File:Layout-neato.png]] | ||
+ | |||
+ | Sourcecode for the above: | ||
+ | digraph "Wikimap" { | ||
+ | layout=neato | ||
+ | overlap=false | ||
+ | "OS" -> "OpenSource" | ||
+ | "OpenSource" -> "Linux" | ||
+ | "OpenSource" -> "BSD" | ||
+ | "BSD" -> "NetBSD" | ||
+ | "BSD" -> "FreeBSD" | ||
+ | } | ||
+ | |||
+ | = See also = | ||
+ | * [[gnupLot]] | ||
[[Category:Command]] | [[Category:Command]] | ||
+ | [[Category:Graphics]] | ||
+ | [[Category:Tool]] |
Latest revision as of 06:39, 24 May 2024
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
digraph "Wikimap" { "OS" -> "OpenSource" "OpenSource" -> "Linux" "OpenSource" -> "BSD" "BSD" -> "NetBSD" "BSD" -> "FreeBSD" }
create the graphical map
dot -Tpdf -o mindmap.pdf source.txt
view the graphical map
xdg-open mindmap.pdf
remove arrows
Here is how you draw a mindmap without arrows, you use "arrowhead=none":
source.txt
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] }
create the graphical map
$ dot -Tpdf -o mindmap.pdf source.txt
view the graphical map
$ xdg-open mindmap.pdf
Layout
You can use several layouts: dot, twopi, neato and circo. Here is the neato layout:
Sourcecode for the above:
digraph "Wikimap" { layout=neato overlap=false "OS" -> "OpenSource" "OpenSource" -> "Linux" "OpenSource" -> "BSD" "BSD" -> "NetBSD" "BSD" -> "FreeBSD" }