From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: org-babel-execute:dot -- why isn't this working? Date: Wed, 23 Sep 2015 20:51:30 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113eeccac4d9e4052073a1b4 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zeul3-0001Dz-Lb for emacs-orgmode@gnu.org; Wed, 23 Sep 2015 20:51:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zeul2-0000H0-DW for emacs-orgmode@gnu.org; Wed, 23 Sep 2015 20:51:33 -0400 Received: from mail-io0-x22e.google.com ([2607:f8b0:4001:c06::22e]:36496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zeul2-0000Gw-8u for emacs-orgmode@gnu.org; Wed, 23 Sep 2015 20:51:32 -0400 Received: by ioii196 with SMTP id i196so61254485ioi.3 for ; Wed, 23 Sep 2015 17:51:31 -0700 (PDT) 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: Org Mode --001a113eeccac4d9e4052073a1b4 Content-Type: text/plain; charset=UTF-8 I'm trying to draw a very simple, silly graph using dot. I'm following the code here: http://irreal.org/blog/?p=2866 and here: http://orgmode.org/worg/org-tutorials/org-dot-diagrams.html I have tables like this (the real ones are substantially longer): #+name: students-graph | a | b | | a | m | | a | f | | b | t | #+name: students-table | *node* | *label* | *shape* | *fillcolor* | |--------+-----------+---------+-------------| | a | Omar | ellipse | green | | b | Hindia | ellipse | orange | | c | Yuvrai | ellipse | purple | I can generate the diagram I'm looking for with this code, mostly stolen from another : #+name: make-dot #+BEGIN_SRC emacs-lisp :var table=students-table graph=students-graph :results output :exports none (mapcar #'(lambda (x) (princ (format "%s [label=\"%s\" shape=%s style=\"filled\" fillcolor=\"%s\"];\n" (car x) (second x) (nth 2 x) (nth 3 x) ))) table) (mapcar #'(lambda (x) (princ (format "%s -- %s;\n" (first x) (second x)))) graph) #+END_SRC --001a113eeccac4d9e4052073a1b4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'm trying to draw a very simple, silly graph using dot. I'm f= ollowing the code here:
htt= p://irreal.org/blog/?p=3D2866
and here:
http://orgmode.org/worg/org-tutorials/org-= dot-diagrams.html

I have tables like this (the real ones are substantially lon= ger):

#+name: students-graph
| a | b |
| a | m |
| a | f |<= br>| b | t |

#+name: students-table
| *node* | *label*=C2=A0=C2= =A0 | *shape* | *fillcolor* |
|--------+-----------+---------+----------= ---|
| a=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | Omar=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 | ellipse | green=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |
| b=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 | Hindia=C2=A0=C2=A0=C2=A0 | ellipse | orange=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 |
| c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | Yuvrai=C2= =A0=C2=A0=C2=A0 | ellipse | purple=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |

<= br>
I can gener= ate the diagram I'm looking for with this code, mostly stolen from anot= her :
#+name: make-dot
#+BEGIN_SRC emacs-lisp :var table=3Dstudents-t= able graph=3Dstudents-graph :results output :exports none
=C2=A0 (mapcar= #'(lambda (x)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 (princ (format "%s [label=3D\"%s\&quo= t; shape=3D%s style=3D\"filled\" fillcolor=3D\"%s\"];\n= "
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (car x) (second x) (nth 2 x) (nth 3 x) ))) t= able)
=C2=A0 (mapcar #'(lambda (x)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (princ (format "%s --= %s;\n"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (first x) (second x)))) graph)

=
#+END_SRC


--001a113eeccac4d9e4052073a1b4--