Re: [SLUG] making graphs

From: ronan (ronan@tampabay.rr.com)
Date: Wed Feb 24 2010 - 05:47:11 EST


Eben King wrote:
> On Mon, 22 Feb 2010, Dylan William Hardison wrote:
>
>> On Monday, February 22, 2010 at 06:00PM -0500, Eben King wrote:
>>> What's an application in which I can draw a graph? I don't mean graphs
>>> as in "charts and graphs", I mean a set of nodes connected by edges,
>>> possibly with weights or direction attached to those edges. Think the
>>> railway network, or an airline's flights.
>>
>> I think you may want http://www.graphviz.org.
>>
>> Way back when, I used graphviz to visualize the PSTA routes.
>
> Great, thanks. Sounds like what I need. BTW, I have this version:
>
> eben@pc:~$ dot -V
> dot - Graphviz version 2.16 (Fri Feb 8 12:54:58 UTC 2008)
>
> How is it used? I can't figure out squat. Running "dot" just hangs,
> and the web page apparently only says what it's used for, not how to
> use it.
>

Here is a simple "dot" text file (save it as test.dot):

digraph G
{
A->B
A->C
A->D
B->X
C->X
D->X
}

Then run:

dot test.dot -T png -o dot_test.png

and you should have a PNG file with five nodes (A,B,C,D,X) that shows
the relationships described in the file test.dot

--ronan

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 14:49:47 EDT