From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: How to place things differently in dot Date: Thu, 26 Mar 2015 16:27:37 -0400 Message-ID: <877fu35wsm.fsf@alphaville.usersys.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbEO4-00030N-Tv for emacs-orgmode@gnu.org; Thu, 26 Mar 2015 16:28:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbEO1-0000LO-O6 for emacs-orgmode@gnu.org; Thu, 26 Mar 2015 16:28:20 -0400 Received: from plane.gmane.org ([80.91.229.3]:36207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbEO1-0000LA-IV for emacs-orgmode@gnu.org; Thu, 26 Mar 2015 16:28:17 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YbENm-0004Sq-UK for emacs-orgmode@gnu.org; Thu, 26 Mar 2015 21:28:03 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Mar 2015 21:28:02 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Mar 2015 21:28:02 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cecil Westerhof writes: > I was asked to make a diagram and was thinking that dot in org-mode could be a good idea. > > I got reasonably fast the following: > This is a good deal in the right direction, but a few things should be different: > ​- E should be left of F > - resource should go to the second 'line' without losing its border > - K should be a 'line' lower > Maybe this will help although it's not a complete implementation of what you have. The idea is to define rows and arrange your nodes into those rows by using rank=same. Then make the row nodes and edges invisible. It's also important to do the sequencing correctly, e.g. in your example, if you just switch F -- E to E -- F, E will be to the left of F as you want. But I don't know how to get the resources subgraph to be treated as a node and thereby place it on the same row as F. In any case, here's the current trial balloon: --8<---------------cut here---------------start------------->8--- #+BEGIN_SRC dot :file test2.svg :cmdline -Kdot -Tsvg graph foo { row1--row2--row3--row4 [style="invisible"]; row1, row2, row3, row4 [style="invisible"]; utilities [label = "Utilities"] A B C D E F [shape="rectangle"] G H I K subgraph cluster_ta { color=blue {rank = same; L, M;} L M } {rank=same; row1 utilities A B C; } {rank=same; row2 D E F;} {rank=same; row3 G H I;} {rank=same; row4 K;} subgraph cluster_resources { resources [label = "Resources"] graph[color=red]; } A -- F B -- F C -- F A -- D E -- F F -- G F -- H F -- I F -- K K -- L K -- M L -- M } #+END_SRC --8<---------------cut here---------------end--------------->8--- HTH, Nick