[GraphViz][GOODIE] Unix hooks for GraphViz

David T. Lewis lewis at mail.msen.com
Sat Mar 12 17:30:41 UTC 2005


This change set allows a GraphViz to produce various dot outputs
(Morphs, PNG, and whatever text outputs can be produced by the dot
program). No external files are used, so it appears to run directly
in Squeak (although /usr/bin/dot gets run quietly in the background
as needed).

In addition to the GraphViz package, this Requires OSProcess and
CommandShell on Unix or Linux. It probably also will work with OS/X
(I'd appreciate if someone can confirm this). The GraphViz software
must of course also be installed (it was right there on my SuSE disks
all along, how about that :)

If you are interested in Morphic layout graphs with Connectors, see
GraphViz class>>makeLayoutCoordinatesUsingOSProcessOnUnix for an
example that produces coordinates in plain text.

Here is the example output for GraphViz>>asLayoutCoordinates. It looks
like it would be straightforward to use for laying out a display of Morphs
and Connectors.

'graph 1.000 5.000 3.722
node Smalltalk  2.500 3.361 0.864 0.500 Smalltalk solid ellipse black lightgrey
node Squeak  0.375 2.361 0.750 0.500 Squeak solid ellipse black lightgrey
node "C++"  4.625 2.361 0.750 0.500 "C++" solid ellipse black lightgrey
node Java  4.625 1.361 0.750 0.500 Java solid ellipse black lightgrey
node "C#"  4.625 0.361 0.750 0.500 "C#" solid ellipse black lightgrey
edge Smalltalk Squeak 4 2.167 3.208 1.806 3.028 1.222 2.764 0.806 2.556 solid black
edge Smalltalk "C++" 4 2.833 3.208 3.194 3.028 3.792 2.750 4.208 2.556 solid black
edge "C++" Java 4 4.625 2.111 4.625 2.000 4.625 1.875 4.625 1.750 solid black
edge Java "C#" 4 4.625 1.111 4.625 1.000 4.625 0.875 4.625 0.750 solid black
stop
'

Dave

-------------- next part --------------
A non-text attachment was scrubbed...
Name: GraphVizUnixHooks-dtl.cs.gz
Type: application/x-gunzip
Size: 2031 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050312/ebc6451c/GraphVizUnixHooks-dtl.cs.bin


More information about the Squeak-dev mailing list