From owner-freebsd-questions@FreeBSD.ORG Tue Sep 16 18:56:39 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09205106567A for ; Tue, 16 Sep 2008 18:56:39 +0000 (UTC) (envelope-from michael.grunewald@laposte.net) Received: from smtp7-g19.free.fr (smtp7-g19.free.fr [212.27.42.64]) by mx1.freebsd.org (Postfix) with ESMTP id 8FCD18FC20 for ; Tue, 16 Sep 2008 18:56:38 +0000 (UTC) (envelope-from michael.grunewald@laposte.net) Received: from smtp7-g19.free.fr (localhost [127.0.0.1]) by smtp7-g19.free.fr (Postfix) with ESMTP id 5D577B0137; Tue, 16 Sep 2008 20:56:37 +0200 (CEST) Received: from Llea.celt.neu (ron34-3-82-236-236-194.fbx.proxad.net [82.236.236.194]) by smtp7-g19.free.fr (Postfix) with ESMTP id C9375B00DF; Tue, 16 Sep 2008 20:56:36 +0200 (CEST) Message-ID: <48D01D84.6080703@laposte.net> Date: Tue, 16 Sep 2008 22:56:36 +0200 From: =?ISO-8859-1?Q?Micha=EBl_Gr=FCnewald?= User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.1.16) Gecko/20080726 SeaMonkey/1.1.11 MIME-Version: 1.0 To: Polytropon References: <20080915163659.90ca2a0b.freebsd@edvax.de> In-Reply-To: <20080915163659.90ca2a0b.freebsd@edvax.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: John Almberg , freebsd-questions@freebsd.org Subject: Re: Port for drawing directed graphs? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 18:56:39 -0000 Polytropon wrote: > On Mon, 15 Sep 2008 10:31:57 -0400, John Almberg wrote: >> I am working on some software that must, as it's final output, >> produce a printout of a directed graph... nodes, connected by >> directed links. >> >> The printout could be generated by a postscript file, jpg, whatever. >> >> Does anyone know of a utility (in ports?) that can take a data set >> (for example, a two dimensional array that defines the nodes and the >> links between them), and produce a printable graph? >> >> Any help much appreciated. > > I think it's possible to use LaTeX for this, as long as you're > willing to provide the document basis, put an \include for the > drawing contents and then have a small processing script that > generates this file. There is some LaTeX document class that > supports graphs, I think. The output would be PS or PDF. TeX and LaTeX usually come with a tool called METAPOST, which reads instructions to draw a picture and outputs a postscript file. This is definitely the best choice to produce figures t put in LaTeX document, but may be useful in solo operation too. The language for METAPOST is adapted to notations like z1 = 1/2(z2 + z3) or z1l = z1 + left and z1r = z1 + right, so it's a really unusual stuff but one gets quickly accustomed with the basics. There is many web pages providing tips for meta post, I also recommand a paper written by André Heck on the subject. -- Michaël