install and usage of dot [debian , ubuntu, raspberrypi]

test-dot

based on:
https://en.wikipedia.org/wiki/DOT_%28graph_description_language%29

install dot (comes with graphviz) and imagemagick (to convert the .ps file to .png):
sudo apt-get install graphviz imagemagick

create a test file:
nano test.dot
and paste the following code:

graph graphname {
     a -- b -- c;
     b -- d;
     e -- b; e -- a; e -- d;
 }

compile the testfile and convert the .ps file to png:
dot test.dot -Tps -o test.ps
convert -flatten -density 150 -geometry 100% test.ps test.png

if you like to watch the pic in bad quality from the commandline with shellpic:
https://fredfire1.wordpress.com/2016/04/02/install-shellpic-debian-64bit/
shellpic test.png

if you just need a simple table out of ascii:
https://senseful.github.io/web-tools/text-table/

Advertisements

2 thoughts on “install and usage of dot [debian , ubuntu, raspberrypi]

  1. Hi, there’s a typo in your instruction. Instead of “sudo apt install graphviz imagemagick”, it should be “sudo apt-GET install…” 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s