Graphviz is an open source tool for creating diagrams on ubuntu, you can create flowchart, data structure and all kind of scientific diagrams using graphviz.
Graphviz consist of several command line programs such as dot, neato, fdp, circo, twopi, and there are also graphical (GUI) based tool such as dotty, lefty, lneato.
How to install graphviz on ubuntu:
How to install graphviz on ubuntu:
sudo apt-get install graphviz
Basically after installing graphviz, you will get all of these tools:
Graph layout programs
- dot [filter for hierarchical layouts of graphs]
- neato [filter for symmetric layouts of graphs]
- twopi [filter for radial layouts of graphs]
- circo [filter for circular layout of graphs]
- fdp [filter for symmetric layouts of graphs]
Graph drawing programs
- lefty [A Programmable Graphics Editor]
- lneato [lefty + neato]
- dotty [lefty + dot]
Graph layout enhancement
- gvcolor [flow colors through a ranked digraph]
- unflatten [adjust directed graphs to improve layout aspect ratio]
- gvpack [merge and pack disjoint graphs]
Graph information and transformation
- gc [count graph components]
- acyclic [make directed graph acyclic]
- nop [pretty-print graph file]
- ccomps [connected components filter for graphs]
- sccmap [extract strongly connected components of directed graphs]
- tred [transitive reduction filter for directed graphs]
- dijkstra [single-source distance filter]
- bcomps [biconnected components filter for graphs]
- gvpr [graph pattern scanning and processing language]
- prune [prune directed graphs]
When using graphviz, there is a learning curve that we need to understand before we can actually use it to create diagram, hopefully with this example can give you an idea of how graphviz works.
Creating a simple diagram using graphviz
Open gedit or other text editor and then copy paste the code below:
digraph G { start_here [label="it's me (start here)"]; start_here -> 2017; bloglife1 [label="create more blog"]; bloglife2 [label="make more money"]; bloglife3 [label="become rich"]; life_goal1[label="married with someone"]; life_goal2[label="have a baby"]; life_goal3[label="happy life"]; 2017 -> bloglife1 -> bloglife2 -> bloglife3; 2017 -> life_goal1 -> life_goal2; node [shape=box,style=filled,color=".7 .3 1.0"]; life_goal2 -> life_goal3 }
Save as 'diagram.txt', and then go to the command line and run this to create the diagram:
dot -Tpng diagram.txt -o diag.png
Open diag.png to see the result, it should be like this:
No comments:
Post a Comment